wellnwill Marathahalli Bangalore

Java Language Fundamentals

Types of Programming Languages

  1. Reserved Words / Keywords
  2. Identifier / user defined words
  3. Data types
  4. Variables
  5. Constant
  6. Literals
  7. Operators
  8. Control Statements

Reserved Words / Keywords :

  • In Java, some words are reserved to represent some functionality. Such type of words are called reserved words.
  • All the keywords are defined in Lower Case.

Keyword List

abstract continue for new switch
assert default if package synchronized
boolean do goto private this
break double implements protected throw
byte else import public throws
case enum instanceof return transient
catch extends int short try
char final interface static void
class finally long strictfp volatile
const float native super while

Identifier :

  • A name in java program is called identifier which can be used for uniquely identification purpose.
  • An identifier is a sequence of one or more characters. The first character must be a valid first character (letter, $, _) in an identifier of the Java programming language. Java Identifiers are case sensitive.
  • A valid identifier can contain alphabets (A to Z / a to z), digits (0-9) and two special characters $ and _.
  • We can’t use Reserved Words / Keywords as an identifier.
  • We can use all the predefined classes/interfaces as an identifier but it is not good programming practice. Ex- class name, variable name, method name etc.

Data Types :

In java every variable has some type and each data type is defined. Every assignment statement is checked by complier for type compatibility.

Data Type compatibility :

Footer with Map