-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasic.java
34 lines (24 loc) · 1019 Bytes
/
Basic.java
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
class Basic{
public static void main(String[] a){
// Starting with the Basics of the Programzx
System.out.println("Hello World !");
// Data Types in JAVA
// 1. Primary Data Types in JAVA
boolean bool1 = true;
System.out.println("A Boolean Value in JAVA is : " + bool1);
byte a1 = 1;
System.out.println("A Byte Variable's Value in JAVA is : " + a1);
short i1 = 12;
System.out.println("A short data type and its value is : " + i1);
int num1 = 234;
System.out.println("A integer data types in JAVA is : " + num1);
long l1 = 234121;
System.out.println("A long data type in JAVA is : " + l1);
float num2 = 34.67f;
System.out.println("A float data type in JAVA is : " + num2);
double num3 = 34.234324;
System.out.println("A Double data type in JAVA is : " + num3);
char c1 = 'a';
System.out.println("A Character data type in JAVA is : " + c1);
}
}