View the step-by-step solution to:

Question

10981495

What statement(s) best describe what the code does

when it compiled and executed?

attachment_12112019.png

Canvas
D
Question 16
Consider the following Java codes.
import javax.swing.JFrame;
import javax.swing.JMenuBar;
public class MyJFrame extends JFrame
JMenuBar bar;
MyJFrame(String s)
super(s);
JMenuBar bar = new JMenuBar();
set/MenuBar(bar);
What statement(s) best describe what the code does when it is compiled and executed?
The inherited class JFrame sets the title for MyJFrame.
The code sets up the menu items onto the menu bar.
O The sets in place the menu bar. Without an attached menu choice it is not visible
The code sets up the menu choices.
D
Question 17

Top Answer

Only adds an empty menubar object... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question