This repository has been archived on 2026-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
CSE-122/linter/TestFile.txt
2026-03-18 00:39:22 -07:00

90 lines
2.2 KiB
Plaintext

package com.example;
public class Example {
public static void main(String[] args) {
int x = 5;
while (x < 10) {
System.out.println("Hello, world!");
break;
}
for (int i = 0; i < 10; i++) {
if (i % 2 == 0) {
continue;
} else {
System.out.println(i);
}
}
try {
throw new Exception("Test");
} catch (Exception e) {
System.out.println("Caught an exception: " + e.getMessage());
} finally {
System.out.println("Finally block executed.");
}
for (int j = 0; j < 100; j++) {
if (j % 2 == 0) {
break;
} else {
System.out.println(j);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
for (int k = 0; k < 1000; k++) {
if (k % 2 == 0) {
break;
} else {
System.out.println(k);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
for (int l = 0; l < 10000; l++) {
if (l % 2 == 0) {
break;
} else {
System.out.println(l);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
for (int m = 0; m < 100000; m++) {
if (m % 2 == 0) {
break;
} else {
System.out.println(m);
}
}
while (x > 5) {
System.out.println("Hello, world!");
break;
}
if (x % 2 == 0) {
continue;
} else {
System.out.println(x);
}
}
}