HELLO!
I am Mahmudul Hasan
You can find me at mhasancse15@gmail.com
1
Software Installation
on Windows
SOFTWARE INSTALLTATION ON WINDOWS
▰ Java JDK
▰ Text Editor or IDE
3
4
First Java Program
Let us look at a simple java program….
5
Data Types in Java
6
Data types specify size and the type of values that can be stored in an identifier.
In java, data types are classified into two categories :
▰ Primitive Data type
▰ Non-Primitive Data type
Type of data that can be stored in this variable.
Primitive Data type
7
A primitive data type can be of eight types :
Primitive Data type
8
Non-Primitive(Reference) Data type
9
Non-Primitive Data Types are also called as Reference Data Types as the
address of the objects or Arrays is stored in a reference variable.
InterfacesClasses Arrays
Variables in Java
When we want to store any information, we store it in an address of
the computer.
Variable is a name of memory location.
10
Types of Variables in Java
11
Local Instance Static
There are three types of variables in Java:
public class FirstClass{
int data=50; //instance variable
static int m=100; //static variable
public static void main(Striang [] args){
int n=90; //local variable
}
}//end of class
Type Casting
Assigning a value of one type to a variable of another type is known
as Type Casting.
Example :
12
int x = 10;
byte y = (byte)x;
Type Casting in Java
13
In Java, type casting is classified into two types,
Java Operators
▰ Arithmetic operators
▰ Relation operators
▰ Logical operators
▰ Bitwise operators
▰ Assignment operators
▰ Conditional operators
▰ Misc operators
14
Java provides a rich set of operators environment. Java operators can be divided into following
categories:
Arithmetic operators
15
Arithmetic operators are used in mathematical expression in the same way that are used in algebra.
Relation operators
16
The following table shows all relation operators supported by Java.
Logical operators
17
Java supports following 3 logical operator. Suppose a=1 and b=0;
18
😉
THANKS!
Any questions?
-------------------------
You can find me at
mhasancse15@gmail.com

Java Basic