Category: java

Java Keyword Interface

The reserved keyword interface is used to declare a special type of class that only contains abstract or default methods, constant static fields, and static interfaces. Later on, it can be implemented by classes that declare the interface with

Java Keyword Native

The reserved keyword native is used in a method declaration to specify that a method is not implemented in the same Java source file. For example, you could define a method as native that was written in C programming

Java Keyword Short

The reserved keyword short is used to define a variable as a numeric data type. The short data type is a 16 bit signed two’s complement integer. It has a minimum value of -32,768 (negative) and a maximum value

Java Keyword Long

The reserved keyword long is used to define a variable as a numeric data type. A keyword long data type is a 64 bit two’s complement integer. The signed long has a minimum value of -9223372036854775808L (negative) and a

Java Keyword Try

The reserved keyword try is used in combination with a catch block and optionally the finally block that follows. The statements within the try block contain code that may throw exceptions. The try along with catch are used to

Java Keyword Int

The reserved keyword int is used in Java to declared a variable as a numeric data type. The int data type is a 32 bit signed two’s complement integer, which has a minimum value of -2147483648 (negative) and a

Java Keyword Import

The reserved keyword import is used at the beginning of a Java source (*.java) file to specify specific classes or entire Java packages to be referenced to later without having to include their package names in the reference. Starting

Java Keyword Implements

The reserved keyword implements is used in a class definition to declare the Interfaces that are to be implemented by the class. The resulting implemented class must provide concrete implementation for the methods defined by the interface. The following

Java Keyword If

The reserved keyword if is used in coordination with the keyword else to create the if-else statement. If the first condition is true, execution of the code inside the if code block is done, otherwise execution jumps down to

Java Keyword For

The reserved keyword for is used to iterate over a range of data, which could include a list, an array, or a collection. When you see the keyword for in Java, it’s going to be associated with a for