Java FAQ's
Java Faq's
Many people say this because Java uses primitive types such as int, char, double. But then all the rest are objects. Confusing question.
Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written to an ObjectStream, the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.
The Collection API is a set of classes and interfaces that support operation on collections of objects. These classes and interfaces are more flexible, more powerful, and more regular than the vectors, arrays, and hashtables if effectively replaces.
Example of classes: HashSet, HashMap, ArrayList, LinkedList, TreeSet and TreeMap.
Example of interfaces: Collection, Set, List and Map.
Iterator is an interface which is used to step through the elements of a Collection.
The window, Frame and Dialog classes use a border layout as their default layout.
Threads block on i/o (that is enters the waiting state) so that other threads may execute while the i/o Operation is performed.
Objects that subclass the Observable class maintain a list of observers. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. The Observer interface is implemented by objects that observe Observable objects.
With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often leads to significant errors.
Yes, a lock can be acquired on a class. This lock is acquired on the class's Class object.