HMHritik manbattulwarinhritik.hashnode.dev·Sep 20, 2022 · 2 min readWe Don't know JAVA #EP8 Interface static methodGuess The Answer First interface Main{ public static void main(String ... args){ System.out.println("EP8"); } } Options 1. EP8 will be printed 2. Nothing will be printed 3. Compile Time Error 4. Runtime Error Answer: EP8 will be prin...00
HMHritik manbattulwarinhritik.hashnode.dev·Sep 6, 2022 · 1 min readWe Don't know JAVA #EP7 Wrapper Class BooleanGuess The Answer First class Main{ public static void main(String ... args){ Boolean b1= new Boolean("false"); Boolean b2= new Boolean("#EP7"); System.out.println(b1.equals(b2)); } } Options 1. true 2. false 3. Compi...00
HMHritik manbattulwarinhritik.hashnode.dev·Aug 31, 2022 · 2 min readWe Don't know JAVA #EP6 CLASS LOADERGUESS THE ANSWER class Student{} public class Main{ public static void main(String ... args){ System.out.println(String.class.getClassLoader()+" "+ Student.class.getClassLoader()); System.out.println(); } } Options 1. ExtensionClassL...00
HMHritik manbattulwarinhritik.hashnode.dev·Aug 25, 2022 · 2 min readYou Don't know JAVA #EP5Case 1(StringBuffer): public class Main{ public static void main(String ... args){ StringBuffer sb1= new StringBuffer("EP5"); StringBuffer sb2= new StringBuffer("EP5"); System.out.println(sb1==sb2); System.out.println(sb1.eq...00
HMHritik manbattulwarinhritik.hashnode.dev·Aug 24, 2022 · 2 min readYou Don't know JAVA #EP4 Part 2If you are reading this before Part 1. I recommend you to go through that blog because we are going to discuss case 3 scenario and case 1 and case 2 discussed on part 1. Hope you are ready for Case 3: || #EP4 PART 2 CASE 3: class Demo{ public voi...00