What is the datatypes in java?

Showing Answers 1 - 2 of 2 Answers

Prasath S.N

  • Feb 13th, 2006
 

A variable's data type determines the values the variable can contain and the operations that can be performed on it.

The Java programming language has two categories of data types ?

a)Primitive  

b)Reference(A data element whose value is an address.).

A variable of Primitive data type contains a single value of the appropriate size and format for it's type.For example integer,float,char, and boolean are all primitive data types.

Arrays,Classes and Interfaces are reference types.The value of a reference type varriable is a reference(an address of)the value or set of values represented by the varriable.

- - - Prasath.S.N

  Was this answer useful?  Yes

greeshma

  • Mar 9th, 2006
 

Data type is nothing but the type of value that the variable is going to store.

In java there are eight elemental data types--->

primitive data types:byte,int,short,long,boolean,char,float,double.

user defined data types :arrays,classes.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions