Online Access Free 1Z0-850 Exam Questions
| Exam Code: | 1Z0-850 |
| Exam Name: | Java Standard Edition 5 and 6, Certified Associate Exam |
| Certification Provider: | Oracle |
| Free Question Number: | 242 |
| Posted: | Oct 21, 2025 |
Given:
1. class Test {
2 . public static void main(String args[]) {
3 . String str = new String("Welcome");
4 . // insert code here
5 . }
6 . }
Which, inserted at line 4, produces the output true?
Given:
1 1. class Cat {
1 4. public static void main(String [] args) {
1 5. Cat c1 = new Cat();
1 6. Cat c3 = new Cat();
1 7. Cat c2 = c1;
1 8. Cat c4 = c3;
1 9. c1 = c4;
2 0. c4 = c2;
2 1. if (c1 == c2) System.out.print("c1 == c2 ");
2 2. if (c1 == c3) System.out.print("c1 == c3 ");
2 3. }
2 4. }
What is the result?