Sail E0 Webinar

MCQs

Total Questions : 17 | Page 1 of 2 pages
Question 1. Which of these class is implemented by FilterInputStream class?
  1.    InputStream
  2.    BufferedInputStream
  3.    FileInputStream
  4.    BufferedFileInputStream
 Discuss Question
Answer: Option C. -> FileInputStream


FileInputStream implements InputStream.


Question 2. Which of these class contains the methods print() & println()?
  1.    System
  2.    System.out
  3.    BUfferedOutputStream
  4.    PrintStream
 Discuss Question
Answer: Option D. -> PrintStream


print() and println() are defined under the class PrintStream, System.out is the byte stream used by these methods .


Question 3. Which of these method of class StringBuffer is used to reverse sequence of characters?
  1.    reverse()
  2.    reverseall()
  3.    Reverse()
  4.    reverseAll()
 Discuss Question
Answer: Option A. -> reverse()


reverse() method reverses all characters. It returns the reversed object on which it was called.


Question 4. Which of these class is used to create an object whose character sequence is mutable?
  1.    String()
  2.    StringBuffer()
  3.    Both of the mentioned
  4.    None of the mentioned
 Discuss Question
Answer: Option B. -> StringBuffer()


StringBuffer represents growable and writeable character sequence.


Question 5. Which of these methods can be used to writing console output?
  1.    print()
  2.    println()
  3.    write()
  4.    All of the mentioned
 Discuss Question
Answer: Option D. -> All of the mentioned


All of the mentioned


Question 6. What does AWT stands for?
  1.    All Window Tools
  2.    All Writing Tools
  3.    Abstract Window Toolkit
  4.    Abstract Writing Toolkit
 Discuss Question
Answer: Option C. -> Abstract Window Toolkit


AWT stands for Abstract Window Toolkit, it is used by applets to interact with the user.


Question 7. Which of these is used to perform all input & output operations in Java?
  1.    streams
  2.    Variables
  3.    classes
  4.    Methods
 Discuss Question
Answer: Option A. -> streams


Like in any other language, streams are used for input and output operations.


Question 8. Which of these classes are used by character streams for input and output operations?
  1.    InputStream
  2.    Writer
  3.    ReadStream
  4.    InputOutputStream
 Discuss Question
Answer: Option B. -> Writer


Character streams uses Writer and Reader classes for input & output operations.


Question 9. Which of these classes are used by Byte streams for input and output operation?
  1.    InputStream
  2.    InputOutputStream
  3.    Reader
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> InputStream


Byte stream uses InputStream and OutputStream classes for input and output operation.


Question 10. Which of these is a type of stream in Java?
  1.    Integer stream
  2.    Short stream
  3.    Byte stream
  4.    Long stream
 Discuss Question
Answer: Option C. -> Byte stream


Java defines only two types of streams “ Byte stream and character stream.


Latest Videos

Latest Test Papers