1 / 9

Tipos de datos básicos en Java

Tipos de datos básicos en Java. Tipos enteros: BYTE. Entero entre –127 y 127 8 bits (1 byte) Byte b= 0;. Tipos enteros: SHORT. Entero entre –32 768 y +32 768 16 bits (2 byteS) Short i=o, j=5;. Tipos enteros: INT. Entero entre – 214 748 3648 y 214 748 3647 32 bits (4 bytes)

Download Presentation

Tipos de datos básicos en Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tipos de datos básicos en Java

  2. Tipos enteros: BYTE • Entero entre –127 y 127 • 8 bits (1 byte) • Byte b= 0; Estructuras de Datos 2005

  3. Tipos enteros: SHORT • Entero entre –32 768 y +32 768 • 16 bits (2 byteS) • Short i=o, j=5; Estructuras de Datos 2005

  4. Tipos enteros: INT • Entero entre – 214 748 3648 y 214 748 3647 • 32 bits (4 bytes) • Int a = 200; int b = -30; int c = 0xF003; Estructuras de Datos 2005

  5. Tipos enteros: LONG • Entero – 9223372036854775808 y 9223372036854775807 • 64 bits (8 bytes) • long a= -1L; long b= 125; long c= 0x1f00230F; Estructuras de Datos 2005

  6. Tipo: CHAR • Datos enteros en el rango \u0000 a \uffff en unicode (0 a 65535) • 16 bits (2 bytes) • Char car= ‘a’; • Char car = 97; Estructuras de Datos 2005

  7. Tipos decimales: FLOAT • Datos con coma flotante • 32 bits (4 bytes) 1 bit para el signo, 8 para el exponente y 24 para la mantisa • Float Pi= 3.14159; Float b = 2.2e-5F; Estructuras de Datos 2005

  8. Tipos decimales: DOUBLE • Datos con coma flotante de 64 bits En el formato IEEE754 • 64 bits (8 bytes) 1 bit para el signo,11 para el exponente y 52 para la mantisa • double Pi= 3.14159; double b = 2/3D; Estructuras de Datos 2005

  9. Tipo lógico: BOOLEAN • Se utiliza para indicar si el resultado de la evaluación de una condición es verdadero o falso, sus valores posibles son TRUE y FALSE. No se pueden convertir a otro tipo de datos pero si a una cadena. Estructuras de Datos 2005

More Related