Keywords in JAVA programming Hands on Coding

Keywords in Java

In this section let's see about keywords in Java. 

Content; 

  1. what are keywords?
  2. List of keywords in java.

What are keywords?

  • The words which are pre-defined in the library can be called as, "keywords".
  • The functionality of the keyword is also pre-defined.
  • You cannot use Keyword as a variable, or function name ,or class name or as an any identifier.
  • All keywords are in lower cases.


Here are the examples of keywords: int, float, char, void, main etc.


Let's have a look on list of keywords in Java

 

char 

Default  

instanceof 

assert 

abstract 

int 

catch 

continue 

double 

finally 

interface 

class 

else 

final 

long 

Const 

return 

if 

short 

this 

strictfp 

static 

super 

switch 

protected 

case 

try 

native 

public 

byte 

transient 

import 

while 

synchronized 

break 

private 

boolean 

package 

volatile 

throw 

throws 

new 

 

 

Note; These are the keywords which we have on Java. You cannot use these words as variable. but if you want to use those as keyword, then make any modifications. 


Examples; char cannot be used as variable, but Char can be used as variables.


For Videos Join Our Youtube Channel: Join Now