0% found this document useful (0 votes)
20 views1 page

JAVA Merged-9

Java has 50 keywords that are reserved words with special meanings to the compiler. For example, the keyword "int" indicates that the variable "score" is an integer type. Keywords cannot be used as variable names because they are part of the Java syntax. The keywords are used to define the syntax and structure of Java programming and include words like "abstract", "assert", and "boolean".

Uploaded by

shaheena.atas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

JAVA Merged-9

Java has 50 keywords that are reserved words with special meanings to the compiler. For example, the keyword "int" indicates that the variable "score" is an integer type. Keywords cannot be used as variable names because they are part of the Java syntax. The keywords are used to define the syntax and structure of Java programming and include words like "abstract", "assert", and "boolean".

Uploaded by

shaheena.atas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Java Programming

Keywords in Java

Keywords are predefined, reserved words used in Java


programming that have special meanings to the compiler.

For example:

int score;

Here, int is a keyword. It indicates that the variable score is of integer


type (32-bit signed two's complement integer).
You cannot use keywords like int, for, class, etc as variable name (or
identifiers) as they are part of the Java programming language syntax.

Java has a total of 50 keywords, which are used to define the


syntax and structure of Java programming language.

Here's the complete list of all keywords in Java programming.

 abstract: used to declare a class or method as abstract. An

abstract class is a class that cannot be instantiated, and an

abstract method is a method without a body that must be

implemented in a subclass.

 assert: used to perform assertion testing in Java. An assertion is

a statement that should always be true, and if it is false, then

an AssertionError is thrown.

You might also like