-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathTest.java
More file actions
97 lines (69 loc) · 1.25 KB
/
Test.java
File metadata and controls
97 lines (69 loc) · 1.25 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import java.lang.Object;
import java.lang.System;
class A{
int i;
A(){
}
A(int i){
this.i = i;
}
void foo(X x, Z z){
System.out.println("A:foo()");
}
void boo(){
System.out.println("A:boo()");
}
}
class B extends A{
B(){
this(5);
}
B(int i){
super(i);
}
void foo(X x, Z z){
System.out.println("B:foo()");
super.foo(x, z);
this.goo();
super.boo();
this.boo();
}
static void goo(){
System.out.println("B:goo()");
}
}
class X{
}
class Y{
}
class Z extends Y{
}
class Test{
public static void main(String[] args){
A a = new A();
B b = new B();
X x = new X();
Z z = new Z();
a.foo(x, z);
b.foo(x, z);
}
public static void floatTest(){
float f = 1;
float g = (float)2.2;
int i=1, j=2;
float res = i*g;
char b='a', d='c';
if (b>d){
System.out.println("Tada");
}
if (f == g){
System.out.println("Tada");
}
if (f > g){
System.out.println("Tada");
}
if (i > j){
System.out.println("Tada");
}
}
}