Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between THIS and CURRENT?  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author and iconoclast
Sheriff
Posts: 24219
40
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya, thats what I was thinking.
I started googling if such keyword exist.
 
adam cannon
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh my then it's an object reference since this code has

current.foo().bar()

all over the place. Thanks!
 
Marshal
Posts: 59108
180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
Catch Ernie! Catch the egg! And catch this tiny ad too:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!