Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.19 KB | None | 0 0
  1. class MyClass1 {
  2.     void doit()
  3.     {
  4.         System.out.println("doit");
  5.     }
  6. }
  7.  
  8. class MyClass2{
  9.     int x=1;
  10.     MyClass2(int x)
  11.     {
  12.         this.x = x;
  13.     }
  14.     void doit()
  15.     {
  16.         System.out.println("doit"+x);
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement