Variables and Data Types

After completing our first program we will study about variables and data types in java. First we will look at variables then we will move towards data types.

Variables are use to store some value while execution of program. For example you want to add two number it mean you should have two numbers to add. so you can store these to numbers in variables. Example of define and initialize variable in Java.


int a=10;


Variables and Data Types in Java


Data Types:-


A Data type identifies a set of values and their representation in memory and set of operations that transform these values into other values that set. Java is strongly typed language. It mean you can write any variable without mentioning its data type. There are two types of data types in java.


  • Primitive data types (built in, predefined types )
  • User-define data types

Primitive Types:- Which is given by keyword to us in java like int, char, float etc. You can also say it predefined or built in data types.





Share this tutorial with your friends on your social Media..

Variables and Data Types Variables and Data Types Variables and Data Types Variables and Data Types



Now You Can Follow All These Tutorials on Your Android Mobile Just Download This App.


Owlbuddy.com