-
-
-
-
-
-
-
What is the Output of the following Java Program
public interface I1{Static String x="inside I1";public void someMethod();}class A implements I1{ public static void main(String args[[]){ System.out.println("Calling I1 var ..."+I1.x);}}
-
Abstract vs Interface Class
Which is faster at class loading - interface or abstract class? Why?
-
Exception on finalize ()?
If Exception occurs in finalize() what happened to garbage collector? It will run or not? Explain
-
-
-
Memory Allocation
What is the difference between below 2 statements?
String s1=new String("abc");String s2="abc";How it will allocate in memory? -
-
-
-
-
More than One Class
If more than one class is present in one Java file then what will be the java file name?
-
Synchronization in Java
When We should use Synchronization in Java and when we should not?
-
-
Overriding Methods
Suppose a Super Class method throws an exception and this method is Overriden in the subclass with no exception. Now if you create a super class reference that has a subclass object. This throws a compile time error, Why?
Core Java Interview Questions
Ans