Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package p;
- public class AB
- {
- public void display()
- {
- System.out.println("This is class AB");
- }
- }
- package p;
- public class CD
- {
- public void display()
- {
- System.out.println("This is class CD");
- }
- }
- import p.*;
- class ABCD
- {
- public static void main(String args[])
- {
- AB a1 = new AB();
- a1.display();
- CD a2 = new CD();
- a2.display();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement