Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class JavaMainClass {
- public static void main (String args[]) throws IOException {
- /*************************************** CONSTRUCTOR COPY AND OVERLOAD IN JAVA ***************************************** START ****************/
- ConstructorCopyAndOverload obj = new ConstructorCopyAndOverload("Rajat", 31);
- ConstructorCopyAndOverload obj2 = new ConstructorCopyAndOverload(obj);
- obj2.displayInfo();
- /*************************************** CONSTRUCTOR COPY AND OVERLOAD IN JAVA ***************************************** START ****************/
- }
- }
Add Comment
Please, Sign In to add comment