Technical Interview Questions and Answers :: Java
- StringBuffer is less efficient than StringBuilder.
- StringBuffer is synchronized i.e. thread safe. It means two threads can't call the methods of StringBuffer simultaneously.
- StringBuilder is more efficient than StringBuffer.
- StringBuilder is non-synchronized i.e. not thread safe. It means two threads can call the methods of StringBuilder simultaneously.
Java doesn't supports multiple inheritence because it causes ambiguity.
No Discussion on this question yet!
A collection is an object that can hold references to other objects. The collection interfaces declare the operations that can be performed on each type ofcollection. The classes and interfaces of thecollections framework are in package java.util.
An exception (or exceptional event) is a problem that arises during the execution of a program. When an Exception occurs the normal flow of the program is disrupted and the program/Application terminates abnormally.
there are two classes.
various concept of java
There are 5 ways to create an object in java.
1. using new keyword
2. using Object class clone() method
3. using deserialization readObject()