About QID enthuware.ocajp.i.v8.2.828
Posted: Sun Jan 08, 2017 12:55 pm
There is a question about what line is invalid. According to the answer it is 3 and 4. Why isn't line 2 wrong?? I even tried manually and it failed to compile.
class Test{ } // 1
public class TestClass {
public int main(String[] args) { // 2
double x=10, double y; // 3
System.out.println[]; // 4
for(int k =0; k<x; k++){ } //5
return 0;
}
}
This is for Java oca SE8.
class Test{ } // 1
public class TestClass {
public int main(String[] args) { // 2
double x=10, double y; // 3
System.out.println[]; // 4
for(int k =0; k<x; k++){ } //5
return 0;
}
}
This is for Java oca SE8.