Questions: 1. Which of these is used to perform all input & output operations in Java? a) streams b) Variables c) classes d) Methods 2. Which of these is a type of stream in Java? a) Integer stream b) Short stream c) Byte stream d) Long stream 3. What will be the output of the following Java program if the input given is ‘abcqfghqbcd’? class Input_Output { public static void main(String args[]) throws IOException { char c; BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); do { c = (char) obj.read(); i. System.out.print(c); } while(c != 'q'); } }
Questions:
1. Which of these is used to perform all input & output operations in Java?
a) streams
b) Variables
c) classes
d) Methods
2. Which of these is a type of stream in Java?
a) Integer stream
b) Short stream
c) Byte stream
d) Long stream
3. What will be the output of the following Java
class Input_Output
{
public static void main(String args[]) throws IOException
{
char c;
BufferedReader obj = new BufferedReader(new InputStreamReader(System.in));
do
{
c = (char) obj.read();
i. System.out.print(c);
} while(c != 'q');
}
}
4. Which classes are used by Byte streams for input and output operation?
5. Which classes are used by character streams for input and output operations?
PS:Please answer on your own definition and not using wikipedia.
Step by step
Solved in 4 steps