ADVANCED TOPICS IN COMPILER DESIGN
CODE GENERATION FOR OBJECT ORIENTED LANGUAGES
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Integer stream
|
|
Short stream
|
|
Byte stream
|
|
Long stream
|
Detailed explanation-1: -The correct answer to the question “Which of these is a type of stream in Java” is, option (d). Byte stream. As you might be knowing, Java defines only 2 types of streams, they are Byte stream and the Character stream.
Detailed explanation-2: -There are two types of streams in Java: byte and character.
Detailed explanation-3: -In java, the byte stream is an 8 bits carrier. The byte stream in java allows us to transmit 8 bits of data. In Java 1.0 version all IO operations were byte oriented, there was no other stream (character stream). The java byte stream is defined by two abstract classes, InputStream and OutputStream.
Detailed explanation-4: -A bytestream is a sequence of bytes. Typically, each byte is an 8-bit quantity, and so the term octet stream is sometimes used interchangeably. An octet may be encoded as a sequence of 8 bits in multiple different ways (see bit numbering) so there is no unique and direct translation between bytestreams and bitstreams.