Monday, 13 July 2009

Java Certification Question 0033

Which of the following statements are true?
1) Java uses a system called UTF for I/O to support international character sets
2) The RandomAccessFile is the most suitable class for supporting international character sets
3) An instance of FileInputStream may not be chained to an instance of FileOutputStream
4) File I/O activities requires use of Exception handling



Answer :
1) Java uses a system called UTF for I/O to support international character sets
3) An instance of FileInputStream may not be chained to an instance of FileOutputStream
4) File I/O activities requires use of Exception handling
Internally Java uses Unicode which are 16 bit characters. For I/O Java uses UTF which may be more thatn 16 bits per character.
Generally InputStreams can only be chained to other InputStreams and OutputStreams can only be chained to other OutputStreams. The piped streams are an exception to this.

No comments: