Java MCQs with answers Page - 34

Here, you will find a collection of MCQ questions on Java. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833.24K Points
Coach

Q. Which of these events is generated when the size os an event is changed?

  • (A) ComponentEvent
  • (B) ContainerEvent
  • (C) FocusEvent
  • (D) InputEvent

A

Admin • 833.24K Points
Coach

Q. Which of these methods can be used to obtain the reference to the container that generated a ContainerEvent?

  • (A) getContainer()
  • (B) getContainerCommand()
  • (C) getActionEvent()
  • (D) getContainerEvent()

A

Admin • 833.24K Points
Coach

Q. To locate a remote object with a name t at port 7000 on host panda.armstrong.edu, use

  • (A) Remote remoteObj = Name.lookup("rmi://panda.armstrong.edu:7000/t");
  • (B) Remote remoteObj = Name.lookup("//panda.armstrong.edu:7000/t");
  • (C) Remote remoteObj = Name.lookup("http://panda.armstrong.edu:7000/t");
  • (D) Remote remoteObj = Naming.lookup("rmi://panda.armstrong.edu:7000/t");

A

Admin • 833.24K Points
Coach

Q. ____________ is a subinterface of java.rmi.Remote that defines the methods for the server object.

  • (A) Server stub
  • (B) Server implementation
  • (C) Server object interface
  • (D) RMI Registry

A

Admin • 833.24K Points
Coach

Q. Each remote object has a unique name identified by an URL with the protocol rmi as follows:

  • (A) http://host:port/name
  • (B) //host:port/name
  • (C) http://host/name
  • (D) rmi://host:port/name

A

Admin • 833.24K Points
Coach

Q. __________ provides the naming services for the server to register the object and for the client to locate the object.

  • (A) Server stub
  • (B) RMI Registry
  • (C) Server implementation
  • (D) Server Skeleton

A

Admin • 833.24K Points
Coach

Q. The following specifies the advantages of It is lightweight. It supports pluggable look and feel. It follows MVC (Model View Controller) architecture.

  • (A) Swing
  • (B) AWT
  • (C) Both A & B
  • (D) None of the above

A

Admin • 833.24K Points
Coach

Q. Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?

  • (A) True
  • (B) False
  • (C) none
  • (D) all

A

Admin • 833.24K Points
Coach

Q. These two ways are used to create a Frame By creating the object of Frame class (association) By extending Frame class (inheritance)

  • (A) True
  • (B) False
  • (C) None of the above
  • (D) All of the mentioned

A

Admin • 833.24K Points
Coach

Q. Which package provides many event classes and Listener interfaces for event handling?

  • (A) java.awt
  • (B) java.awt.Graphics
  • (C) java.awt.event
  • (D) None of the above

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ