Question: What is wrong with the following code? Give two effective ways to fix it. 1 import javax.swing.*; 2 import java.awt.event.*; 3 4 public class H2ClassJ
What is wrong with the following code? Give two effective ways to fix it.
1 import javax.swing.*; 2 import java.awt.event.*; 3 4 public class H2ClassJ extends JFrame { 5 public static final long serialVersionUID = 22; 6 7 public H2ClassJ () { 8 addMouseListener (new MouseListener () { 9 public void mouseClicked (MouseEvent e) {} 10 }); 11 } // end constructor 12 13 } // end class H2ClassJ
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
