YYYEJI

[JAVA] Primitive data type의 종류 본문

Java

[JAVA] Primitive data type의 종류

YEJI ⍢ 2022. 10. 22. 22:59
728x90

 

①  Integer 

   . . . -2, -1, 0, 1, 2, . . . etc.

  byte (1 bytes)

  short (2 bytes)

  int (4 bytes)

  long (8 bytes)

 

 

②  Floating point

  9.99, 3.15913494, -5.0 etc.

  float (4 bytes)

  double (8 bytes)

 

 

③  Character

  'Hello world' etc.

  char (2 bytes)

  Using single quotes

  System.out.println('Hello World');

 

 

④  Boolean

  True (1 bit)

  False (1 bit)

 

 

 

 

   ◡̈