JavaRush/Java Blog/Random EN/50 keywords in JAVA

50 keywords in JAVA

Published in the Random EN group
members
Yesterday in class we played a game called “Key Words”. Everyone had to name the key word and explain as best they could what it meant. There were about 15 of us, enough for more than three laps. Some dropped out in the first, some in the second. On a happier note, I was the last to drop out. Those. took second place, if you can give out places, in this game. 50 keywords in JAVA - 1So, try your hand, without the help of Google, of course, otherwise the point is lost, remembering them all without explanation. To check yourself, look under the cat. Currently, there are 50 (fifty!) keywords defined in the JAVA language. There used to be a little more, but the current JAVA specification specifies 50 words, which are listed below. I tried to break them into groups, I won’t explain each one, so most of it should be clear. Primitives
  1. byte
  2. short
  3. int
  4. long
  5. char
  6. float
  7. double
  8. boolean
Loops and branches
  1. if
  2. else
  3. switch
  4. case
  5. default
  6. while
  7. do
  8. break
  9. continue
  10. for
Exceptions
  1. try
  2. catch
  3. finally
  4. throw
  5. throws
Scope
  1. private
  2. protected
  3. public
Advertisement\Import
  1. import
  2. package
  3. class
  4. interface
  5. extends
  6. implements
  7. static
  8. final
  9. void
  10. abstract
  11. native // ​​signals that the method is implemented in platform-dependent code, often in C. For example, the hashcode method in Object has such a modifier.
Create\Return\Call
  1. new
  2. return
  3. this
  4. super
Multithreading
  1. synchronized
  2. volatile
Keywords that exist (reserved) but are not used in the language
  1. const
  2. goto
Keywords that are not included in any of the groups
  1. instanceof
  2. enum // enumeration
  3. assert // data check
  4. transient // applies to class fields and means that the field is not part of the persistent state of the class. Those. During serialization, this field will not be written. And, accordingly, during de-serialization it will not be restored from the byte stream.
  5. strictfp // I’ve heard everything except this word before, but I had to hear this for the first time (no one could name it and the word const, by the way). By modifying a class, method, interface with the strictfp keyword, you ensure that floating point calculations will be performed as in older versions. This is done to ensure that the results of floating point operations are consistent across all platforms.
PS All these words in alphabetical order and with small explanations are here. That's all for now! Good luck to everyone and see you again!
Comments
  • Popular
  • New
  • Old
You must be signed in to leave a comment
This page doesn't have any comments yet