forked from anshulc55/JavaTraining
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecoundJavaClass.java
More file actions
61 lines (47 loc) · 1.09 KB
/
SecoundJavaClass.java
File metadata and controls
61 lines (47 loc) · 1.09 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
53
54
55
56
57
58
59
60
61
public class SecoundJavaClass {
public static void main(String[] args) {
String str1 = "Hello";
String str2 = "Team";
int a = 200;
int b =300;
System.out.println(str1 + " " + str2);
System.out.println( a + b);
System.out.println( a + b + str1 + str2);
System.out.println(str1 + str2 + a + b);
if(a>1000){
System.out.println("A is greater then 1000");
} else {
System.out.println("A is less then 1000");
}
if(a==100){
System.out.println("A is 100");
}else if (a==200) {
System.out.println("A is 200");
}else if (a==300) {
System.out.println("A is 300");
}else{
System.out.println("Value doesn't present");
}
int day =4;
switch (day) {
case 1:
System.out.println("Today is Monday");
break;
case 2:
System.out.println("Today is Tuesday");
break;
case 3:
System.err.println("Today is Wednesday");
break;
case 4:
System.out.println("Today is Thrusday");
break;
case 5:
System.out.println("Today is Friday");
break;
default:
System.out.println("Heyyyy!!!! It's weekend");
break;
}
}
}