This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Difference between THIS and CURRENT? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Difference between THIS and CURRENT?" Watch "Difference between THIS and CURRENT?" New topic
Author

Difference between THIS and CURRENT?

adam cannon
Greenhorn

Joined: Apr 02, 2008
Posts: 6
Hi,

I understand the THIS keyword is used in classes definitions to call its own methods and variables. However, what does CURRENT do? These are very difficult terms to search for in google as you can imagine.

ac
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Hi Adam,

"current" isn't a keyword in Java. If you saw this in a program it was either a variable name or a method name defined in that program.


[Jess in Action][AskingGoodQuestions]
Shivit Agarwal
Ranch Hand

Joined: Feb 28, 2008
Posts: 82
Ya, thats what I was thinking.
I started googling if such keyword exist.


Have the determination of mirror which never fails to reflect in spite of being broken into pieces.<br /> <br />Kiss the hands you cannot bite.<br /> <br />An Optimist is one who starts taking a bath when he accidentally falls into the water.
adam cannon
Greenhorn

Joined: Apr 02, 2008
Posts: 6
oh my then it's an object reference since this code has

current.foo().bar()

all over the place. Thanks!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38509
    
  23
If it has foo and bar in, then it is example code. "Foo" and "Bar" are the two names used in coding because it takes too long to write whatJaMaCallIt.thingAMiJig(youKnowWhatIMean);
 
Don't get me started about those stupid light bulbs.
 
subject: Difference between THIS and CURRENT?