Updates test file

This commit is contained in:
Nicolas Amaya
2025-10-26 21:41:58 -06:00
parent 1157885d92
commit f3fb1b16dd
2 changed files with 16 additions and 22 deletions

View File

@@ -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();

View File

@@ -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");
}
} }