Free Source Code and Tutorials

Custom Search

Basic Datatypes


Basic Datatypes

In java there are two types of data types:
1. Primitive data types:System defined data types are called primitive data types.
1. byte: Its bit-size is 8 byte a=10;
2.short: Its bit-size is 16 Short a=1000;   It is applied for integers.Its bit-size is 32 bits. eg. int a=10000;
4.long:  It is applied for large integer numbers.Its bit-size is 64 long a=100000;
5.float:  It is applied for fractional numbers with small range.Its bit-size is 32 float a=26.78;
6.double:  It is applied for fractional numbers with wide range values.Its bit-size is 64 double x=0.00007348739329;
7.char:  It is applied for a single character.Its bit-size is 16 x=’L’;
8.boolean:  It contains a two possible values true or false.The default value is a=true;

2. Non-Primitive data types-These are derived from the primitive data,classesetc.

Facebook Comments
(Visited 3 times, 1 visits today)
Share this

Check Your Domain Ranking

Updated: January 31, 2016 — 1:31 am

Leave a Reply

Your email address will not be published. Required fields are marked * © 2016 Frontier Theme

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!

%d bloggers like this: