MY mENU


Thursday 15 March 2012

What is a KeySet View ?

KeySet is a set returned by the keySet() method of the Map Interface, It is a set that contains all the keys present in the Map.

What is an EntrySet View?

Entry Set view is a set that is returned by the entrySet() method in the map and contains Objects of type Map.

Can we instantiate an interface?

You can’t instantiate an interface directly, but you can instantiate a class that implements an interface.

Is it possible to override the main method?

NO, because main is a static method. A static method can't be overridden in Java.

What methods java providing for Thread communications ?

Java provides three methods that threads can use to communicate with each other: wait, notify, and notifyAll. These methods are defined for all Objects (not just Threads). The idea is that a method called by a thread may need to wait for some condition to be satisfied by another thread; in that case, it can call the wait method, which causes its thread to wait until another thread calls notify or notifyAll. 

can i Call Abstract method from non abstract method?


Yes, We can call a abstract method from a Non abstract method in a Java abstract class