package com.udayan.oca;
public class Test {
public static void main(String[] args) {
String str1 = " ";
boolean b1 = str1.isEmpty();
System.out.println(b1);
str1.trim();
b1 = str1.isEmpty();
System.out.println(b1);
}
}
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?
1. package com.udayan.oca;
2.
3. import java.util.ArrayList;
4. import java.util.List;
5.
6. public class Test {
7. public static void main(String [] args) {
8. List
9.
10. list.add(27);
11. list.add(27);
12.
13. list.add(new Integer(27));
14. list.add(new Integer(27));
15.
16. System.out.println(list.get(0) == list.get(1));
17. System.out.println(list.get(2) == list.get(3));
18. }
19. }
What will be the result of compiling and executing Test class?
© Copyrights DumpsEngine 2025. All Rights Reserved
We use cookies to ensure your best experience. So we hope you are happy to receive all cookies on the DumpsEngine.