-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.java
More file actions
50 lines (40 loc) · 1.04 KB
/
HelloWorld.java
File metadata and controls
50 lines (40 loc) · 1.04 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
public class HelloWorld{
public static void main(String[] args)
{
int x = 5;
System.out.println("x = " + x);
method6(x);
System.out.println("x = " + x);
if(x == 4)
{
System.out.println("Hello World!");
method1();
}
method2();
SlaveHello.method3();
SlaveHello slave3 = new SlaveHello();
slave3.method3();
SlaveHello slave4 = new SlaveHello();
slave4.method4();
SlaveHello.method3();
slave4.method3();
}
public static void method6(int x)
{
System.out.println("method6.x = " + x);
x = x + 1;
System.out.println("method6.x = " + x);
x = x + 1;
System.out.println("method6.x = " + x);
x = x + 1;
System.out.println("method6.x = " + x);
}
public static void method1()
{
System.out.println("Blah!");
}
private static void method2()
{
System.out.println("Blah Blah!!");
}
}