Question 1 of 25
Hints left: 3
Q1
What does AWT stands for?
Q2
Which of these class is implemented by FilterInputStream class?
Q3
System class is defined in .................
Q4
Which of these is a type of stream in Java?
Q5
What will be the output of the following Java program if 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(); System.out.print(c); } while(c != 'q'); } }
Q6
Which of these classes defined in java.io and used for file-handling are abstract? A. InputStream B. PrintStream C. Reader D. FileInputStream E. FileWriter
Q7
What will be the output of the following Java program if input given is "abc'def/'egh"? 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(); System.out.print(c); } while(c != '\''); } }
Q8
Which exception is thrown by read() method?
Q9
What will be the output of the following Java program? class output { public static void main(String args[]) { StringBuffer c = new StringBuffer("Hello"); System.out.println(c.length()); } }
Q10
Which of these classes are used by Byte streams for input and output operation?
Q11
What is the purpose of the `Console` class in Java?
Q12
What will be the output of the following Java program if input given is "abc'def/'egh"? 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(); System.out.print(c); } while(c!='\''); } }
Q13
Which of these classes are used by character streams for input and output operations?
Q14
Which of these methods can be used to writing console output?
Q15
Which of these is used to perform all input & output operations in Java?
Q16
Which of these is used to read a string from the input stream?
Q17
What will be the output of the following Java program? class output { public static void main(String args[]) { StringBuffer s1 = new StringBuffer("Hello"); s1.setCharAt(1,x); System.out.println(s1); } }
Q18
Which of these class is used to read characters and strings in Java from console?
Q19
try{ File f = new File("a.txt"); }catch(Exception e){ }catch(IOException io){ } Is this code create new file name a.txt ?
Q20
When comparing java.io.BufferedWriter and java.io.FileWriter, which capability exist as a method in only one of two ?
Q21
Which of these classes are used by character streams output operations?
Q22
What will be the output of the following Java program? class output { public static void main(String args[]) { StringBuffer c = new StringBuffer("Hello"); StringBuffer c1 = new StringBuffer(" World"); c.append(c1); System.out.println(c); } }
Q23
Which of these class contains the methods print() & println()?
Q24
Which of these class is used to read from byte array?
Q25
What will be the output of the following Java program if input given is "Hello stop World"? class Input_Output { public static void main(String args[]) throws IOException { string str; BufferedReader obj = new BufferedReader(new InputStreamReader(System.in)); do { str = (char) obj.readLine(); System.out.print(str); } while(!str.equals("strong")); } }