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>");
return;
}
System.out.println("WELCOME TO THE JUNGLE");
FileInputStream in = new FileInputStream(new File(args[0]));
CompilationUnit cu = JavaParser.parse(in);
in.close();

View File

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