Java Variables

Java is an object oriented language which was developed byjames gosling at sun microsystem of USA in the year of 1991. It was intially released in 1995 as core component at the sun microsystem in USA. This was originally called as Oak By Goslin. James Goslin is generally known as father of java. Goslin born in 19th may 1955, he is a canadian computer scientist. It is a platform independent and secured programming language. This language is used to develop mobile apps , web apps and enterprise software systems. We are going to learn JAVA VARIABLES in this article

Java Tutorial For Beginner To Advance

Java Tutorial For Beginner To Advance

How Java Works?
Java First Compiled into Byte code then it is interpreted to machine code. It is purely oriented language.
source code——compiled->bytecode–>Machine code

JAVA INSTALLATION

To install java go to google and type “install jdk” it installs the Java JDK.
Now go to google and type “install i telliJ Idea” it installs java IDE.
JDK- Java development kit – It is a collection of tools and it is used for developing and running the java programs.
JRE- Java Runtime Environment – It executes the programs.

CHAPTER-1 : Variables

Just like we have some rules while speaking English, same like this there are rules to follow while writing a java program. The set of the rules called “Syntax”.

Variables

A variable is a container that stores a value. This value can changed while the execution of the program.

Example: int number = 45 ;

Here “int” is data type , “number” is variable name and “8” is value it stores.

RULES FOR DECLARING A VARIABLE NAME 

*We can choose a name while declaring a java variable if the following rules are followed:

1.Variable name must not begin with a digit

2. Name is case sensitive

3. Should not be a keyword (Like Void)

4. Can contain alphabets and characters, _character and digits if the other conditions are met.

 

 

1 thought on “Java Variables”

Leave a Comment