• Post Reply Bookmark Topic Watch Topic
  • New Topic

where are all keywords like 'final' and 'this' stored in java?  RSS feed

 
Jaspreet Sachdeva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please let me know in which package or class i can find all the predefined keywords in java like "this" etc...

actually i want to know if this operator is itself final in nature or not from its syntax?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know that they would be stored in a class anywhere, but you can find them here.
 
Campbell Ritchie
Marshal
Posts: 56576
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Keywords such as 'final' and 'this' are just built-in features of the Java programming language. They are special things that the Java compiler understands. They are not "stored" anywhere in a package or class. In fact, your question is a little strange.
 
Campbell Ritchie
Marshal
Posts: 56576
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if you do reflection and get the properties of a field, you can get its modifiers, so something must record final.
I suggest you write a little class and compile it and inspect it with javap Foo
You can use the -c option before the class name to get more details of the code. More details about javap here (I hope).
 
Jaspreet Sachdeva
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks all for your kind replies....this was my first post in javaranch....thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!