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