Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
04-26-2011, 04:31 PM
#1
Member
Registered: Mar 2010
Distribution: Slackware
Posts: 40
Rep:
Very easy java question
I often see this
aaa.bbb();
The above is not hard. aaa might be an instance of a certain class, and bbb() is the method included on the class.
myObject.mymethod(); <= this is not hard to understand.
But what about something like this?
aaa.ccc.bbb();?
what is the ccc in that? It would be neither the name of the instance nor the name of the method.
Here is an example.
R.layout.main
What is layout and what is main in that situation?
and another example that comes to my mind is
System.out.println();
what is out in the above example?
Thanks a lot, world-class experts @ Linux Questions!!
04-26-2011, 05:26 PM
#2
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,627
1 members found this post helpful.
04-26-2011, 07:26 PM
#3
Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Rep:
Hi -
There are actually *several* different possibilities:
EXAMPLE: aaa.bbb.ccc()
* member function "ccc()" of object "bbb" in namespace "aaa"
... or ...
* member function "ccc()" of object "bbb", which is itself a member of object "aaa"
There's also the idiom:
* aaa.bbb().ccc()
1 members found this post helpful.
04-27-2011, 07:58 AM
#4
LQ 5k Club
Registered: Sep 2009
Distribution: Arch x86_64
Posts: 6,443
Quote:
Originally Posted by
puppymagic
aaa.ccc.bbb();?
Class aaa has a member named ccc (which is an instance of a class), which has a method called bbb.
04-27-2011, 09:42 AM
#5
Member
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 459
Rep:
Class.object.subroutine()
Subroutine may be a method.
Thread Tools
Search this Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 06:03 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News