-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPrimitiveDatatype.java
More file actions
52 lines (41 loc) · 1.33 KB
/
Copy pathPrimitiveDatatype.java
File metadata and controls
52 lines (41 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//boolean Data Type
public class PrimitiveDatatype{
public static void main(String[] args){
boolean isSttudent = true;
boolean isTeacher = false;
System.out.println("IS STUDENT? " + isSttudent);
System.out.println("IS TEACHER ? " + isTeacher);
//byte Data Type
byte Student = 10;
byte Teacher = -8;
System.out.println("STUDENT ? " + Student);
System.out.println("TEACHER ? " + Teacher);
//short Data Type
short neelima = 8000;
short geethika = -5000;
System.out.println("NEELIMA"+ neelima);
System.out.println("GEETHIKA"+ geethika);
//int Data Type
int a = 8000000;
int b = -5000000;
System.out.println("a"+ a);
System.out.println("b"+ b);
//long Data Type
long hello = 8000000000L;
long world = -5000000000L;
System.out.println("HELLO"+ hello);
System.out.println("WORLD"+ world);
//float Data Type
float f = 3.14f;
System.out.println("PI VALUE IS " + f);
//double Data Type
double d = 3.144444444444444444;
System.out.println(" VALUE IS " + d);
//CHAR Data Type
char NEELU = 'N';
System.out.println("CHARACTER IS " + NEELU);
//String Data Type
String name = "NEELIMA";
System.out.println("MY NAME IS " + name);
}
}