Java MCQ Questions and Answers

Take Exam

Java MCQ questions with answers are essential for mastering object-oriented programming concepts and preparing for placement exams. These programming questions and answers commonly appear in company-wise interview tests like TCS, Infosys, and Wipro. Topics include data types, inheritance, interfaces, exception handling, and multithreading. Practicing Java MCQ online enhances coding logic, syntax accuracy, and problem-solving ability. Students can also download Java programming questions with solutions PDF to reinforce learning before interviews and coding assessments.

Java MCQ

Showing 10 of 22 questions

21. Which of the following are true? a)The Serializable interface is used to identify objects that may be written to an output stream. b)The Externalizable interface is implemented by classes that control the way in which their objects are serialized. c)The Serializable interface extends the Externalizable interface. d)The Externalizable interface extends the Serializable interface.

  • a,b&d
  • a,c&d
  • b,c&a
  • d,c&a
Show Answer Report

22. Which of the following are true about the File class? a)A File object can be used to access the files in the current directory. b)When a File object is created, a corresponding directory or file is created in the local file system. c)File objects are used to access files and directories on the local file system. d)File objects can be garbage collected.

  • a,c&d
  • a,b&c
  • b,c&d
  • c,a&b
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test