Saturday, 10 November 2018

keywords in java | what is java keyword - online help

Keywords in java:

Guyz in this post we are going to discuss keyword in java.so, what is java keywords? and let's see how many keywords are there in java? so let's get started,

Keywords also referred to as reserved words. It has a predefined specific meaning. The user has no right to change its meaning.

For example,

int height;

Here, int is a keyword.it indicates that the variable height is of the integer data type.

Keywords cannot be used as a variable or identifier as they are part of the programming language syntax.


READ: features of java programming

Keywords should be written in lower case. Around 60 words have been reserved as the keywords in java language. The following are reserved for java:

Abstract
Default
If
Package
This
Class
Float
Native
Int
Return
Interface
Short
Assert
Char
Final
Finally
Long
Static
Volatile
Throws
Throw
Instanceof
Null
Try
Void
Continue
Const
Catch
Do
Break
Import
Byte
Public
Case
For
While
Goto
Boolean
Implements
Private
Double
Protected
Else
Transient
Extends
New
Switch
Synchronized
Super
True
False
Enum
Strictfp
Transient

The keyword 'const and goto' is a reserved word but it is not used and has no functions.

No comments:

Post a Comment