Character Stream : Derived using Reader(Reading from Character file) and Writer (Writing character to files) interface Byte Stream : Derived using InputStream(Reading from file) and OutputStream(for writing to file)
Which of the following statement is correct? 1. In character streams (e.g. HadoopExam.com), data is handled in terms of bytes (e.g. 0100001001), in byte streams, data is handled in terms of Unicode characters e.g. UTF-8. UTF-16.
2. Character streams are suitable for reading or writing to files such as executable files, image files, and files in low-level file formats such as .zip, .class, and .jpg.
4. Byte streams are meant for handling binary data (e.g. 1010101010); character streams are meant for human-readable characters.
Correct Answer : Get Lastest Questions and Answer : Explanation: In character streams (e.g. I am learning Java HadoopExam.com), data is handled in terms of Unicode characters, whereas in byte streams, data is handled in terms of bytes. Byte streams are suitable for reading or writing to files such as executable files, image files, and files in low-level file formats such as .zip, .class, and .jar. Character streams are suitable for reading or writing to text-based I/O such as documents and text, XML, and HTML files
Correct Answer : Get Lastest Questions and Answer : Explanation: At the time of serialization, JVM checks for the duplicate object; if an object is already serialized then JVM do not serialize the object again; instead, JVM stores a reference to the serialized object. As you are trying to set the value to already serialize welcome class object.
Question : Which of the following is a correct way to create Local instance?
A. Locale loc1 = "CA"; B. Locale loc2 = Locale.getInstance("en"); C. Locale loc3 = Locale.getLocaleFactory("CA"); D. Locale loc4 = Locale.GERMANY; E. Locale loc5 = new Locale("en", "CA");