• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Which are the ways in which a client can get a reference to an existing entity object

 
Ranch Hand
Posts: 188
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranchers,

Question :
Which are the ways in which a client can get a reference to an existing entity object's local component interface ?

Answer
B. Receive the reference as a parameter in a method call.

Can someone please justify this answer

Thanks
 
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There has to be a point - SOMEWHERE - in the flow of control for information to be passed from on part of the program to another. This is where abstracting away the fundamental operation of the machine shows a weakness as a design paradigm.

Although one could design a language such that a declaration of a reference to an object was made useable by that declaration, Java has historical origins such that auto-vivification of variables compartmentalizes to the area where the variable is declared.

To access that variable from another area of the program, you have to ask for it.

That would be called a getter method.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic