Rabu, 23 November 2016

How to work with sub classes in java

An inner class is a class which is defined inside another class. The inner class can access all the members of an outer class, but vice-versa is not true. The mouse event handling program which was simplified using adapter classes can further be simplified using inner classes. Following is a Java program which handles the mouse click event using inner class and adapter class: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 import javax.swing.*; import java.awt.*; import java.awt.event.*; public class MyApplet extends JApplet { JLabel

The post How to work with sub classes in java appeared first on Coding Security.


How to work with sub classes in java
read more

Tidak ada komentar:

Posting Komentar