• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

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.
 
Did you just should on me? You should read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic