-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLecture2.java
59 lines (41 loc) · 1.33 KB
/
Lecture2.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// YT Link --> https://www.youtube.com/watch?v=t6zLJOCVqD0&list=PLDzeHZWIZsTryvtXdMr6rPh4IDexB5NIA&index=2
public class Lecture2{
public static void main(String[] args) {
System.out.println("Namaste Dunia :-)\n");
int a = 123;
System.out.println(a);
char b = 'v';
System.out.println(b);
boolean b1 = true;
System.out.println(b1);
float f = 1.2f;
System.out.println(f);
double d = 1.23;
System.out.println(d);
int size = Double.BYTES;
System.out.println("Size of d is: " + size);
int a1 = 'a';
System.out.println(a1);
char c1 = 98;
System.out.println(c1);
// char c2 = 123456;
// System.out.println(c2);
int a2 = 2/5;
System.out.println(a2);
System.out.println(2.0/5);
int a3 = 2;
int b3 = 3;
boolean first = (a3 == b3);
System.out.println(first);
boolean second = !(a3 > b3);
System.out.println(second);
boolean third = (a3 < b3);
System.out.println(third);
boolean fourth = (a3 >= b3);
System.out.println(fourth);
boolean fifth = (a3 <= b3);
System.out.println(fifth);
boolean six = (a3 != b3);
System.out.println(six);
}
}