LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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

Reply
 
Search this Thread
Old 04-26-2011, 04:31 PM   #1
puppymagic
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 48

Rep: Reputation: 4
Red face 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!!
 
Old 04-26-2011, 05:26 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
http://en.wikipedia.org/wiki/Namespa...cience%29#Java



Cheers,
Tink
 
1 members found this post helpful.
Old 04-26-2011, 07:26 PM   #3
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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()
Quote:
EXAMPLE:
http://download.oracle.com/javase/6/...ang/Class.html

Class.forName("Foo", true, this.getClass().getClassLoader())
 
1 members found this post helpful.
Old 04-27-2011, 07:58 AM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713Reputation: 713
Quote:
Originally Posted by puppymagic View Post
aaa.ccc.bbb();?
Class aaa has a member named ccc (which is an instance of a class), which has a method called bbb.
 
Old 04-27-2011, 09:42 AM   #5
AnanthaP
Member
 
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 607

Rep: Reputation: 127Reputation: 127
Class.object.subroutine()

Subroutine may be a method.
 
  


Reply

Tags
class, java, method, object


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: An Easy Way to Convert Java to XML LXer Syndicated Linux News 0 12-13-2007 12:20 AM
Looking for easy to use IDE - java Irajas Linux - Software 3 05-09-2007 04:02 PM
recommend any fast easy java editor mineshvarmas Programming 5 01-16-2006 01:08 PM
Noobs java question on applets probably easy...sorry in advance vdogvictor Programming 2 03-16-2004 11:58 AM
Easy steps to Java plug-in installation RaiReg Mandriva 5 01-26-2004 11:18 PM


All times are GMT -5. The time now is 04:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration