Search your topic in Java2share
Home > FAQs
eXTReMe Tracker


CoreJava FAQs


Untitled Document

Q97. What value does read() return when it has reached the end of a file?
The read() method returns -1 when it has reached the end of a file.

Q98. Can a Byte object be cast to a double value?
No, an object cannot be cast to a primitive value.

Q99. What is the difference between a static and a nonstatic inner class?
A non-static inner class may have object instances that are associated with instances of the class's outer class. A static inner class does not have any object instances.

Q100. What is the difference between the String and StringBuffer classes?
String objects are constants. StringBuffer objects are not.