-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.java
More file actions
84 lines (57 loc) · 1.12 KB
/
HelloWorld.java
File metadata and controls
84 lines (57 loc) · 1.12 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
import java.net.URI;
import java.util.*;
class Test{
public int m;
private int n;
public Test(int m,int n){
this.m=m;
this.n=n; //value=value;
}
public Test(){
this(3,8);
}
public void o(Object a){
System.out.println("Hello,I an father class");
}
public void output(){
System.out.println("m="+m+"n="+n);
}
}
class TestSon extends Test{
private int a;
private int b;
public TestSon(int m,int n,int a,int b){
super(m,n);
this.a=a;
this.b=b;
}
public void output(){
// super.output();
System.out.println("a="+a+"b="+b);
// System.out.println(super.m);
}
public void out(){
//super.output();
System.out.println("a="+a+"b="+b);
}
public void o(Date d){
System.out.println("Hello,I am son class");
}
}
public class HelloWorld{
public static void main(String[] args) throws Exception{
List<Integer> l=new LinkedList<>();
l.add(3);
l.add(1);
l.add(2);
Iterator i=l.iterator();
Iterator i1=l.iterator();
// l.add(5);
// i1.next();
// i1.remove();
i1.next();
i1.next();
while(i.hasNext())
System.out.println(i.next());
}
}