compilation error: the left part of the job must be a variable
class A { public static void main(String[] args) { for(true;true;true) {
but when i tried this way, compilation error
class A { public static void main(String[] args) { for (getBoolean(); true; getBoolean()) { } } public static boolean getBoolean() { return true; } }
getBoolean () returns a boolean, so in the first case, why doesn't the for loop take a boolean directly?
java
zombie
source share