-
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?
-
Inter Thread Communication
What are all the methods used for Inter Thread communication and what is the class in which these methods are defined?
-
Find the Output
class A{ public static void main(String[] a){ System.out.print(String.valueOf(1)+String.valueOf(2)); String s1="s1"; String s2=s1.toString(); System.out.print(","+(s1==s2)); }}
-
-
ReadLine() Function
Explain readLine function in Core Java.
-
Arrays/Linked List
When and on what conditions will you decide whether to use linked lists or arrays, also Which process is fastest and which is slowest in arrays as well as linked list i.e, sorting, searching, add, delete etc.
-
Serialization Process
Explain the use of serialization process in real time projects?
-
-
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);}}
-
Marker Interface
When there is no methods in the marker interface, then what is the use of marker interface. What is the functionality of the interface. Why do we need to implement marker interface?
-
Null keyword
Is null a keyword? if not what is it?
-
Difference between throw and throws
What exactly is the difference between between throw and throws? If both are used for the same purpose then why are both needed instead of one?
-
-
How to catch an Error occurred in a class
Can we catch an Error occurred in a class by extending that class with Throwable Since, Exception and error is the sub class of throwable.If yes/no- why?
-
Core Java Interview Questions
Ans