Free Oracle 1Z0-850 Exam Dumps Questions & Answers
| Exam Code/Number: | 1Z0-850Join the discussion |
| Exam Name: | Java Standard Edition 5 and 6, Certified Associate Exam |
| Certification: | Oracle |
| Free Question Number: | 242 |
| Publish Date: | Nov 17, 2026 |
| # of views: | 2423 |
|
|
|
Given:
1 8. String s = " abcdcba ";
1 9. int x = 2;
2 0. s = s.trim();
2 1. if (s.length() < 8) {
2 2. x = s.indexOf('c', 3);
2 3. }
2 4. System.out.println("x = " + x);
What is the result?
Given:
4 . class Example {
5 . int x = 50;
6 . int y = 100;
7 . public static void main(String args[]) {
8 . int x = 0, y = 10;
9 . Example ex = new Example();
1 0. while (x < 3) {
1 1. x++; y--;
1 2. }
1 3. System.out.println("x = " + x + " , y = " + y);
1 4. }
1 5. }
What is the result?