-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp_2.java
More file actions
41 lines (30 loc) · 672 Bytes
/
p_2.java
File metadata and controls
41 lines (30 loc) · 672 Bytes
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
class p_Dog {
public static void main (String [] id) {
System.out.println(new Cat().woof(false));
}
}
class Cat {
int lmao;
public int woof(boolean x){
boolean local;
int i;
local = x;
if(x){
System.out.println("Returning from woof");
return 0;
}
else {}
i = new Fish().blub(true);
return 0;
}
}
class Fish {
Cat c;
public int blub(boolean y){
int x;
c = new Cat();
x = c.woof(y);
System.out.println("Calling blub once");
return 0;
}
}