Special Offer! Black Friday Price Drop! Extra 20% OFF- Ends In Coupon code: DG2020
Become Oracle Certified with updated 1Z0-808 exam questions and correct answers
CGiven the code fragments:

Consider below code:
1. package com.udayan.oca;
2.
3. public class Test {
4. public static void main(String[] args) {
5. StringBuilder sb = new StringBuilder();
6. try {
7. for(;;) {
8. sb.append("OCA");
9. }
10. } catch(Exception e) {
11. System.out.println("Exception!!!");
12. }
13. System.out.println("Main ends!!!");
14. }
15. }
What will be the result of compiling and executing Test class?
Consider below code:
1. //Test.java
2. package com.udayan.oca;
3.
4. public class Test {
5. public static void main(String[] args) {
6. StringBuilder sb = new StringBuilder(100);
7. System.out.println(sb.length() + ":" + sb.toString().length());
8. }
9. }
What will be the result of compiling and executing Test class?
Consider below code:
1. //Test.java
2. package com.udayan.oca;
3.
4. import java.time.LocalDate;
5.
6. public class Test {
7. public static void main(String [] args) {
8. LocalDate joiningDate = LocalDate.parse("2006-03-16");
9. System.out.println(joiningDate.withDayOfYear(29));
10. }
11. }
What will be the result of compiling and executing Test class?
Given:

© Copyrights DumpsCertify 2025. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsCertify.