Tuesday, February 2, 2021

Java Language Fundamentals

 Hi All,

Here we all will be discussing about some fundamental concepts of Java.

1. Identifiers

Identifiers can be defined as a name in java program which can be used for identification purpose. It can be a method name, variable name, class name, label name, package name or interface name.

For example:

So we can see that there are 5 identifiers in the above program.

There are certain rules to follow while naming identifiers:

For example:

1. Identifiers can have alphabets (a-z, A-Z), digits(0-9), underscore(_) and dollar sign($).

2. Identifiers can be of any length.

3. Identifiers must not begin with digits.

4. Identifiers are case sensitive i.e. uppercase and lowercase letters are treated differently.

5. We cannot use reserved words as identifiers.

6. All predefined classes and interfaces can be use as identifiers name. Even though it is valid but it is not a good programming practice.


Reserved Words:

Java has 53 reserved words. 



No comments:

Post a Comment

Check whether the word is Special word or Palindrome word.

Special words are those words which starts and ends with the same letter.  Examples: EXISTENCE COMIC WINDOW Palindrome words are those words...