This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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


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: 24189
    
  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: 43885
    
  32
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);
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Difference between THIS and CURRENT?
 
It's not a secret anymore!