Полезная информация

Java in a Nutshell

Previous Chapter 13 Next

13. Java Syntax

Primitive Data Types
Character Escape Sequences
Reserved Words
Java Documentation Comment Syntax

13.1 Primitive Data Types

Java supports a complete set of primitive data types, listed in Table 13.1. In Java, the size of each type is defined by the language, and is not implementation dependent, as it is in C.

Table 13.1: Java Primitive Data Types
        Min Value
Type Contains Default Size Max Value
boolean true or false false 1 bit N.A.
char Unicode character \u0000 16 bits \u0000
byte signed integer 0 8 bits -128
short signed integer 0 16 bits -32768
int signed integer 0 32 bits -2147483648
long signed integer 0 64 bits -9223372036854775808
float IEEE 754 0.0 32 bits +/-3.40282347E+38
  floating-point     +/-1.40239846E-45
double IEEE 754 0.0 64 bits +/-1.79769313486231570E+308
  floating-point     +/-4.94065645841246544E-324

Previous Home Next
Invoking a Named Method Book Index Character Escape Sequences

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java