Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| |||||
Java - Interview Questions and Answers | |||||
![]() | |||||
| |||||
Ans. If the Object value will not change, use String Class because a String object is immutable. If the Object value can change and will only be modified from a single thread, use StringBuilder because StringBuilder is unsynchronized(means faster). If the Object value may change, and can be modified by multiple threads, use a StringBuffer because StringBuffer is thread safe(synchronized). | |||||
![]() ![]() ![]() | |||||
![]() | |||||
![]() ![]() ![]() ![]() ![]() ![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() | |||||
![]() a. It should be declared public and static b. it should have only 1 argument of type String array c. We can override main method d. We can overload main method | |||||