Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
26 lines (20 loc) · 712 Bytes

File metadata and controls

26 lines (20 loc) · 712 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package abcPackage;
public class J10_08{
public static void main(String args[]) {
Student S1 = new Student(); // Default Constructor Invoked
System.out.println("Record of S1 : " );
S1.display();
System.out.println();
Student S2 = new Student(101, "Mahdi", 80); // Argumented Constructor Invoked
System.out.println("Record of S2 : " );
S2.display();
Student S3 = new Student(S2); // Copy Constructor Invoked
System.out.println();
System.out.println("Record of S3 : " );
S3.display(); // displays Record of S2
S3 = S1; // Object S3 is initialized by S1
System.out.println();
System.out.println("Now Record of S3 : " );
S3.display(); // displays Record of S2
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.