Java MCQ Questions and Answers pdf | Java Multiple Choice Questions

Java MCQ Questions and Answers pdf | Java Multiple Choice Questions for the preparation of academic and competitive examinations.

Are you preparing for competitive exams that test your knowledge of Java programming? Are you in need of a comprehensive resource that provides multiple-choice questions and answers to help you assess your understanding of this popular programming language?

Look no further! In this article, we will explore the availability of Java MCQ (Multiple Choice Questions) Questions and Answers in PDF format, specifically tailored for competitive exams.

Whether you are a beginner or an experienced programmer looking to brush up on your skills, these questions and answers will serve as the perfect tool to enhance your preparation and boost your confidence before taking on any Java-related examination. So let’s dive in and discover the valuable resources at your disposal!

Java MCQ Questions and Answers pdf  Java Multiple Choice Questions

Java MCQ Questions and Answers

1. ___ and ___ classes are derived from the Throwable class.
Ans. Error and Exception.

2. Exception classes are available in the ___ package.
Ans. java.lang

3. ___ exception will be thrown when you divide by zero.
Ans. Arithmetic Exception.

4. ___ exception will be thrown if you try to access the array element beyond its index value.
Ans. ArrayIndexOutOfBounds.

5. Java programs written to run on World Wide Web (WWW) are called ___.
Ans. applets.

6. Applets can be tested using the ___ tool included in the Java Development Kit.
Ans. applet viewer

7. When the user interacts with the application by pressing a key or clicking a mouse button, an ___ is generated.
Ans. event

8. The ___ class is at the top of the event class hierarchy.
Ans. EventObject

9. When the user clicks on the button, the ___ event is generated.
Ans. ActiionEvent

10. An ___ event is generated by a scroll bar.
Ans. AdjustmentEvent

11. An ___ event is generated when an item from a list, a choice, or a check box is selected.
Ans. ItemEvent.

12. The ___ method draws the graphics of the applet in the drawing area.
Ans. paint()

13. AWT stands for ___.
Ans. Abstract Windowing Toolkit

14. ___ defines how the components will be arranged in a container.
Ans. Layout Manager

15. The Applet tag is written in the ___ tag of an HTML document.
Ans. body

16. Parameters can be sent to the applet using the ___ tag.
Ans. PARAM

17. JAVA API stands for ___.
Ans. Java DataBase Connectivity Application Program Interface

18. Give some examples of DBMS products.
Ans. MS Access, SQL Server, MySQL, Oracle, Sybase, etc.

19. <protocol> in a JDBC URL is always ___.
Ans. JDBC

20. <subprotocol> in JDBC URL must be ___.
Ans. odbc

21. ___ is used to identify the database in the JDBC URL.
Ans. <subname>

22. A ___ is a collection of related information and a ___ is the software that provides you with a mechanism to manipulate data in the database.
Ans. Database, Database Management System (DBMS).

23. MS-Access stores the data in ___ file format whereas MS-SQL Server stores the data in a ___ file format.
Ans. .MDB, .DAT

24. RMI stands for ___.
Ans. Remote Method Invocation

25. A ___ is a service that runs on a server and helps the objects on other hosts to remotely access its registered objects.
Ans. Remote Registry Server.

26. Objects that are exported for remote access must implement the interface called ___.
Ans. remote interface.

27. JSP stands for ___.
Ans. Java Server Pages.

28. A ___ is a small pluggable extension to a server that enhances the server’s functionality.
Ans. Servlet.

29. CGI stands for ___.
Ans. Common Gateway Interface.

30. Middle tier of three-tier architecture contains ___.
Ans. Application Logic.

31. Servlet Life Cycle contains ___, ___ and ___ methods.
Ans. init(), service(), destroy().

32. CORBA stands for Common ___.
Ans. Common Object Request Broker Architecture.

33. IDL stands for ___.
Ans. Interface Definition Language.

34. CORBA and the IDL mappings are the work of an industry consortium known as the ___.
Ans. Object Management Group

35. The ___ is a very simple test container for JavaBeans.
Ans. BeanBox.

36. A Bean obtains all the benefits of Java’s “___” paradigm.
Ans. write-once, run-anywhere

37. The right-hand window of the bean box contains ___showing the properties for the currently selected bean.
Ans. PropertySheet.

38. The Graphics class is a part of the ___ package.
Ans. java.awt

39. All the methods that are to be invoked remotely must throw the exception called ___.
Ans. RemoteException.

40. RMI uses the ___ protocol for transporting the information.
Ans. TCP

41. ___ is an abstract class that is used to create a format for opening a stream connection to a specific URL.
Ans. URLStreamHandler

42. The ___ method is used to report that a thread has died.
Ans. threadDeathEvent()

43. ___ package contains all the network related classes and methods of Java.
Ans. java.net

44. ___ method opens a connection to an URL and enables to extract data from that connection.
Ans. getInputStream()

45. ___ class is used to read a stream of data that is generated by a network connection and produce an object.
Ans. ContentHandler()

46. ___ is an abstract class that is used to create and control a connection to a platform- and firewall-specific location.
Ans. URLConnection

47. The heart of the Java programming language is contained in a set of packages called ___, which is a part of the Java API.
Ans. java.lang,

48. The JDK also includes a package called ___, which is designed to make the application-debugging process easier.
Ans. sun.tools.debug,

49. ___ and ___ are two Java interpreters.
Ans. java, java_g

50. The various stacks in existence as a program runs are called the ___.
Ans. stack frame.

Most Important Human-Computer Interface MCQs with Answer

51. ___ method prints all object information.
Ans. dump.

52. ___ method frees all unused objects.
Ans. gc.

53. ___ was the first programming language that could be used to send interactive programs over the World Wide Web.
Ans. Java

54. A ___ is an encrypted file or files that accompany a program, indicating exactly from whom the file came.
Ans. Digital signature

55. The document that represents this digital signature is called a ___.
Ans. Certificate.

56. An applet provider must verify its identity using a group called a ___.
Ans. Certificate Authority

57. ___ is used to create and manage public keys, private keys and security certificates.
Ans. Keytool.

58. All information that is managed by a key tool is stored in a database called ___.
Ans. Keystore

59. Sun Microsystems includes a default key store that uses a new file format called ___.
Ans. JKS (Java Key Store)

60. The Java archival tool ___ is used to pack into a single archive file a Java program and all resource files that it requires.
Ans. Jar

Download Java MCQ in pdf for competitve exams

Conclusion

This article has provided a comprehensive collection of Java MCQ questions and answers for competitive exams. We have covered various topics, from basic concepts to advanced features of the Java programming language.

By going through these MCQs, readers can test their knowledge and understanding of Java and enhance their preparation for exams. Whether you are a beginner or an experienced programmer, these questions will help solidify your understanding of Java’s fundamentals.

So, make sure to download the PDF version of these MCQs and continue practicing to excel in your upcoming competitive exams. Good luck! If you like the post, please share it on social media.

You may also like

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *