Advertisement
GSculerlor

MainClass

Oct 12th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. package OverloadOverride;
  2.  
  3. public class MainClass {
  4.     public static void main(String[] args) {  
  5.         MyClass t = new MyClass(0);  
  6.         t.info();  
  7.         t.info("overloaded method");  
  8.         //Overloaded constructor:  
  9.         new MyClass();  
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement