• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Java actual argument

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Given the statement:



Is the code between the outer parenthesis an actual argument?
 
Marshal
Posts: 72926
330
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's correct your code tags; it tells you how they work here.

What's an actual argument? It isn't a term in common use. If you mean, whether “anObjectReference.aMethod(anotherObjectReference)” constitutes an argument to the println() method, then the answer is yes.
 
Saloon Keeper
Posts: 23692
161
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The more common terms here are "argument expression" or "argument value".
 
Sheriff
Posts: 16205
270
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:
What's an actual argument? It isn't a term in common use.


If OP meant this then it actually is pretty common - it's one of the first things I learned when studying about parameters, the difference between actual and formal parameters/arguments.

The actual parameter is not the expression itself but the value the expression evaluates to. But that's kind of quibbling with semantics though because in practical terms you do treat the expression itself as a representation of the value it returns, kind of like how we usually refer to a reference variable as if it was itself  the object it refers to.
 
Marshal
Posts: 7982
560
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@OP

In academia I heard those, but not much/often outside of it. More commonly I know them as parameters and arguments.

In the method defininion they are referred to as parameters. And from the method caller perspective they are referred to as arguments.

Example:
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic