Updates test file
This commit is contained in:
@@ -31,7 +31,7 @@ public class LCA_JP1_0_0 {
|
|||||||
System.out.println("Usage: java LCA_JP1_0_0 <JavaSourceFile>");
|
System.out.println("Usage: java LCA_JP1_0_0 <JavaSourceFile>");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
System.out.println("WELCOME TO THE JUNGLE");
|
||||||
FileInputStream in = new FileInputStream(new File(args[0]));
|
FileInputStream in = new FileInputStream(new File(args[0]));
|
||||||
CompilationUnit cu = JavaParser.parse(in);
|
CompilationUnit cu = JavaParser.parse(in);
|
||||||
in.close();
|
in.close();
|
||||||
|
|||||||
@@ -1,27 +1,21 @@
|
|||||||
public class Test {
|
public class Test {
|
||||||
public void methodOne() {
|
public int methodForLoop() {
|
||||||
class Helper234 {
|
int val = 1;
|
||||||
int val = 1;
|
|
||||||
int compute() {
|
for (int i = 0; i < 10; i++) {
|
||||||
for (int i = 0; i < 10; i++) {
|
val += 1;
|
||||||
val += 1;
|
if (val == 5) {
|
||||||
if (val == 5) {
|
val = 5;
|
||||||
val = 5;
|
} else if (val < 5) {
|
||||||
} else if (val < 5) {
|
val = 3;
|
||||||
val = 3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return val;
|
||||||
// Example of using Helper234 inside methodOne
|
|
||||||
Helper234 helper = new Helper234();
|
|
||||||
int result = helper.compute();
|
|
||||||
System.out.println("Result: " + result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void methodTwo() {
|
int result = this.methodForLoop();
|
||||||
System.out.println("Hello");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user