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.
31 / 66
Difference between StringBuffer and StringBuilder
StringBuffer:
StringBuilder:
32 / 66
Java doesn't supports multiple inheritence because it causes ambiguity.
33 / 66
34 / 66
No Discussion on this question yet!
35 / 66
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.
36 / 66
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.
37 / 66
there are two classes.
outer class
inner class
38 / 66
various concept of java
1.abstraction
2.pollymorphisum
3.inheritance
4.encapsulation
5.object
6.class
39 / 66
There are 5 ways to create an object in java.
1. using new keyword
2. using Object class clone() method
3. using deserialization readObject()
40 / 66
.Final variable