OOPS and Core Java Interview Question and Answers
13. | Define a stream in Java? |
---|---|
A stream is an abstraction that either produces or consumes information. Java programs perform I/O through streams. | |
14. | What is an object Serialization? |
---|---|
|
|
15. | What is the difference between StringBuilder and StringBuffer class? |
---|---|
It is very much similar to StringBuffer except for one difference: it is not synchronized, which means that is is not thread safe. The advantage of StringBuilder is good performance. In case of multithreading you must use StringBuffer rather than StringBuilder. | |
16. | What is the difference between Abstract classes and Interfaces? |
---|---|
|
|