Advertisement
Virajsinh

Java_Java

Mar 4th, 2018
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. public class Demo
  2.  
  3. {
  4.  
  5.   public Demo()
  6.  
  7.   {
  8.  
  9.     System.out.println("From default constructor");
  10.  
  11.   }
  12.  
  13.   public static void main(String args[])
  14.  
  15.   {
  16.  
  17.     Demo d1 = new Demo();
  18.  
  19.     Demo d2 = new Demo();
  20.  
  21.   }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement