Thursday, March 17, 2011

Trick Ps3 To Recognise Ad Hoc Connection

Variables in Java Java Data Types in Object-Oriented Programming

The
data types allow us to represent the different data that are required when implementing a program. For example, if you write a simple program to add, subtract, multiply and divide (a basic calculator) will be necessary to use numerical data types that can be: integer or floating.
data types in Java are:

integer data types

1)
byte type byte of data may represent data that are integers in the range of -128 to +127.
The size of a data type byte is 8 bits.

2) short
The data type can represent short integer data that are in the range of -32768 to +32767.
The size of a data type short is 16 bits.

3) int
The int data type can represent integer data who are in the range of -2147483648 to +2147483647.
The size of a data type int is 32 bits.

4) long
The data type int data can represent integers that are in the range -9223372036854775808 and +9223372036854775807.
The size of a data type int is 64 bits.
To indicate explicitly that the data is a long adds a L or l end of the value of the variable.


FLOATING RATE DATA

1)
float data type float can represent floating point data are in the range 1.40239846e +38 3.40282347e-45f and f.
The size of a data type short is 32 bits.
To indicate explicitly that the data is a float adds a F or f end of the value of the variable.


2) double
The data type can represent double floating point data that are in the range of 4.94065645841246544E-324D and 1.7976931348623157e +308 d.
The size of a data type short is 64 bits.
To indicate explicitly that the data is a double adds a D or d end of the value of the variable.


BOOLEAN DATA TYPE
The boolean data type may represent two logical values: true (true) or false (false).


DATA TYPE CHAR
The char data type is used to represent
character (Unicode code).
A character is represented internally by an integer.

0 comments:

Post a Comment