Online Access Free 1Z0-501 Exam Questions
Exam Code: | 1Z0-501 |
Exam Name: | Java Certified Programmer |
Certification Provider: | Oracle |
Free Question Number: | 147 |
Posted: | Sep 04, 2025 |
Given:
1 . public class IfTest (
2 . public static void main(string[]args) {
3 . int x = 3;
4 . int y = 1;
5 . if (x = y)
6 . system.out.printIn("Not equal");
7 . else
8 . system.out.printIn("Equal");
9 .}
1 0. )
What is the result?
Given:
1. class super {
2. public float getNum() {return 3.0f;}
3 . )
4 .
5 . public class Sub extends Super {
6 .
7 .)
Which method, placed at line 6, will cause a compiler error?