Log In Register

Units


Input & Output Basics - Questions and Answers

 

Practice these Input & Output Basics under Java Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Input & Output Basics for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Input & Output Basics of Java Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge Java Programming specifically Input & Output Basics.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Input & Output Basics under Java Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Input & Output Basics topic of Java Programming:

 

1.  Which of these is used to perform all input & output operations in Java?

Answer: Option A

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

2. What does AWT stands for?

Answer: Option C

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

3. Which of these classes are used by character streams for input and output operations?

Answer: Option B

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

4.  Which of these class is used to read from byte array?

Answer: Option D

Explanation:

5.
try{
      File f = new File("a.txt");
}catch(Exception e){
}catch(IOException io){
}

Is this code create new file name a.txt ? 

Answer: Option C

Explanation:

IOException is unreachable to compiler because all exception are going to catch up by Exception block.

6. Which of these is a type of stream in Ja

Answer: Option C

Explanation:
 Java defines only two types of streams – Byte stream and character stream

7. Which of these classes are used by Byte streams for input and output operation?

Answer: Option A

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