Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package OverloadOverride;
- public class MainClass {
- public static void main(String[] args) {
- MyClass t = new MyClass(0);
- t.info();
- t.info("overloaded method");
- //Overloaded constructor:
- new MyClass();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement