0% found this document useful (0 votes)
3 views3 pages

Understanding Object References in Java

Uploaded by

MONICA NAHAK
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

Understanding Object References in Java

Uploaded by

MONICA NAHAK
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

dt : 12/8/2023

Execution flow of above program:(Demonstrating references Concept)

ClassFiles:

[Link]

[Link]

i
[Link](MainClass)

thi
ipa
Ma
sh
ate
nk

===================================================================
=====
Ve

Advantage of HAS-A relation or References Concept:

=>In references Concept we can interlink objects.

=>In references concept,through one object we can access members of another


object.
===================================================================
=====

Assignment:

ProjectName : References_App2

packages,

p1 : EmpAddress,EmpContact,Employee

i
thi
p2 : DemoRef2(MainClass)

ipa
Employee

=>empId,empName,empDesg Ma
=>EmpAddress ea,EmpContact ec

=>void getEmployee()
sh

EmpAddress
ate

=>city,state,pinCode

=>void getEmpAddress()
nk
Ve

EmpContact

=>mailId,city

=>void getEmpContact()

DemoRef2
=>main()

Note:

=>Employee-Object must hold references of EmpAddress-Object and


EmpContact-Object

===================================================================

i
thi
==========

ipa
Ma
sh
ate
nk
Ve

You might also like