File tree 3 files changed +10
-10
lines changed
3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1
1
public class A {
2
2
3
- private B dependence = null ;
3
+ private B circularDependence = null ;
4
4
private String myName = null ;
5
5
6
6
public A () {
7
- dependence = new B ();
7
+ circularDependence = new B ();
8
8
myName = "I'm A class" ;
9
9
}
10
10
Original file line number Diff line number Diff line change 1
1
public class B {
2
2
3
- private A dependence = null ;
3
+ private A circularDependence = null ;
4
4
private String myName = null ;
5
5
6
6
public B () {
7
- dependence = new A ();
7
+ circularDependence = new A ();
8
8
myName = "I'm B class" ;
9
9
}
10
10
Original file line number Diff line number Diff line change @@ -8,13 +8,13 @@ public HelloWorld(String text) {
8
8
System .out .println (text );
9
9
}
10
10
11
- public static void main (String [] args ) {
12
- System .out .println ("Hello, world!" );
13
- System .out .println (new HelloWorld ("Call me!" ).getWord ());
14
-
15
- }
16
-
17
11
public String getWord () {
18
12
return "Hello!" ;
19
13
}
14
+
15
+ public static void main (String [] args ) {
16
+ System .out .println (new HelloWorld ().getWord ());
17
+
18
+ System .out .println (new HelloWorld ("Call me!" ).getWord ());
19
+ }
20
20
}
You can’t perform that action at this time.
0 commit comments