CORE JAVA

What is the use of the finally block? Is finally block in Java guaranteed to be called? When finally block is NOT called?

15 Oct , 2016  

The finally block always executes when the try block exits. This ensures that the finally block is executed even if an unexpected exceptio...

CORE JAVA

Why there are two Date classes; one in java.util package and another in java.sql?

15 Oct , 2016  

A java.util.Date represents date and time of day, a java.sql.Date only represents a date. The complement ofjava.sql.Date is java.sql.Time,...

CORE JAVA

Explain marker interfaces?

15 Oct , 2016  

The marker interface pattern is a design pattern. used with languages that provide run-time type information about objects. It provides a mean...

CORE JAVA

When do you override hashCode() and equals()?

15 Oct , 2016  

hashCode() and equals() methods have been defined in Object class which is parent class for java objects. For this reason, all java objects...

CORE JAVA,Interview,Interview Questions

Why finalize() method should be avoided?

15 Oct , 2016  

We all know the basic statement that finalize() method is called by garbage collector thread before reclaiming the memory allocated to the obj...

CORE JAVA,Interview Questions

Difference between Error vs Exception in Java – Interview question

29 Sep , 2016  

1) As I said earlier, Main difference on Error vs Exception is that Error is not meant to catch as even if you catch it you cannot recover...

Collection Framework,CORE JAVA,Interview Questions

Array vs ArrayList in Java

29 Sep , 2016  

1) First and Major difference between Array and ArrayList in Java is that Array is a fixed length data structure while ArrayList is a vari...

CORE JAVA,Interview Questions,Threading

wait() vs notify() vs notifyAll in threading

29 Sep , 2016  

1) Though wait, notify and notifyAll are related to threads they are not defined in java.lang.Thread class, instead they are defined in the Obje...

CORE JAVA,Interview Questions

Stack vs Heap in Java

27 Sep , 2016  

Here are few differences between stack and heap memory in Java: 1) The main difference between heap and stack is that stack memory is used to st...

CORE JAVA,Interview Questions

Difference between BufferedReader and Scanner class

26 Sep , 2016  

1. Scanner is a much more powerful utility than BufferedReader. It can parse the user input and read int, short, byte, float, long and double ap...