Java Identifiers in Hindi- What are Java Identifiers and Keywords

1
252
views
Java Identifiers in Hindi , Core java Tutorials, Core Java Guide
Java Identifiers in Hindi , Core java Tutorials, Core Java Guide

Java Identifiers in Hindi

Definition of  Java Identifier

“A Name in the Java Program is Called Java Identifiers, it can be class name or variable name or method name or label name.”

Java Guide First Simple Program for basic understanding

class JavaGuide

{

Public static void main(String args[])

{

Int j=100;

}

}

Where, JavaGuide indicates classname

                               main()   indicates methodname

                                   j       indicates variablename

“orange color words indicate-Identifiers”

Java Identifiers, Core Java Guide, Core Java Tutorials, Best Core java Tutorials in Hindi

Rules to define Java Identifiers:-

If we are using any other characters we will get Compile Time Error

Example:     Java_Guide

                       JavaGuide#

                        _$_$

                        007$_11

Identifier can’t Shift with digit.

Example:     007javaguide

                        Javaguide007

Reserved Words can’t be used as Identifiers.

All predefined Java class names & Interface names we can use for identifiers.

It is legal but it is not recommended.

Simple Example for Java Identifiers clarity

class JavaGuide

{

Public Static void main(String args[])

{

Int String =007;

System.out.println(String);

}

}

You can see in above program where we used classname String as an identifier. It is also valid.

class JavaGuide

{

Public Static void main(String args[])

{

Int Runnable=007;

System.out.println(Runnable);

}

}

Java Identifiers, Core Java Guide in Hindi, Core Java Tutorials

You can see in above program where we used Interface name Runnable as an identifier. It is also valid.

Only allowed characters in Java Identifier are:

Example:

A to Z

a to z

0 to 9

 _

$

There is no Length Limit for Java Identifiers. But It’s not recommended to take more than 15 length.(words>15)

simple example for Java Identifiers

class JavaGuide

{

Int value=10;

Int value=20;

Int value=30;

}

Java Valid Identifiers List

Java4Guide

Java_Guide

Integer

Double

Runnable

hope you like Java Identifiers. we will provides you some more easy stuff in upcoming post. visit for more – Go4Vidhya

LEAVE A REPLY

Please enter your comment!
Please enter your name here