I was curious about .class files and the code inside and realised that variables in one of the classes that I compiled is named as var0 which is very interesting.
I am wondering if someone could explain why.
Java Code (.java file):
public class StackOverflowExample {
public static void main(String[] args) {
loop(50_000);
System.out.println("Success!");
}
public static void loop(int repeats) {
if (repeats > 0) {
loop(repeats - 1);
}
}
}
Decompiled Code (.class file):
public class StackOverflowExample {
public StackOverflowExample() {
}
public static void main(String[] var0) {
loop(50000);
System.out.println("Success!");
}
public static void loop(int var0) {
if (var0 > 0) {
loop(var0 - 1);
}
}
}