Computer Science, asked by Anonymous, 9 months ago

(In reference to java). What are keywords?

Answers

Answered by Anonymous
3

Explanation:

In the Java programming language, a Keyword is any one of 51 reserved words that have a predefined meaning in the language; because of this, programmers cannot use keywords as names for variables, methods, classes, or as any other identifier. Of these 51 keywords, 49 are in use and 2 are not in use.

Answered by Tvesaa
1

Answer:

Java has a set of keywords that are reserved words that cannot be used as variables, methods, classes

Explanation:

Java keywords are also known as reserved words. Keywords are particular words which acts as a key to a code. These are predefined words by Java so it cannot be used as a variable or object name.

A list of Java keywords or reserved words are given below:

  1. abstract: Java abstract keyword is used to declare abstract class. Abstract class can provide the implementation of interface. It can have abstract and non-abstract methods.
  2. boolean: Java boolean keyword is used to declare a variable as a boolean type. It can hold True and False values only.
  3. break: Java break keyword is used to break loop or switch statement. It breaks the current flow of the program at specified condition.
  4. byte: Java byte keyword is used to declare a variable that can hold an 8-bit data values.
  5. case: Java case keyword is used to with the switch statements to mark blocks of text.
  6. catch: Java catch keyword is used to catch the exceptions generated by try statements. It must be used after the try block only.
  7. char: Java char keyword is used to declare a variable that can hold unsigned 16-bit Unicode characters
  8. class: Java class keyword is used to declare a class.
  9. continue: Java continue keyword is used to continue the loop. It continues the current flow of the program and skips the remaining code at the specified condition.
  10. default: Java default keyword is used to specify the default block of code in a switch statement.

HOPE IT HELPS YOU :)

Similar questions