Sale!

Consider the following Java program. Which one of the following is an interface?

Original price was: $1.50.Current price is: $1.00.

Description

Consider the following Java program. Which one of the following is an interface?

import java.awt.event.*;

import javax.swing.*;

public class MouseWhisperer extends JFrame implements MouseListener {

MouseWhisperer() {

super(“COME CLOSER”);

setSize(300,100);

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

addMouseListener(this);

setVisible(true);

}

public void mouseClicked(MouseEvent e) { setTitle(“OUCH”); }

public void mousePressed(MouseEvent e) { setTitle(“LET GO”); }

public void mouseReleased(MouseEvent e) { setTitle(“WHEW”); }

public void mouseEntered(MouseEvent e) { setTitle(“I SEE YOU”); }

public void mouseExited(MouseEvent e) { setTitle(“COME CLOSER”); }

public static void main(String[] args) { new MouseWhisperer(); }

}

Select one:

a. java.awt.event

b. JFrame

c. MouseEvent

d. MouseListener

e. super

Billing details

Additional information

Your order

Product
Quantity
Total
Cart Subtotal $0.00
Order Total $0.00

  • Pay with your credit card.