-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAula0019.java
More file actions
39 lines (25 loc) · 808 Bytes
/
Aula0019.java
File metadata and controls
39 lines (25 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
public class Aula0019 {
public static void main(String[] args) {
//tipos primitivos no Java
//por padrão ele sempre será false
//ocupa 1 byte, ou 8 bits
boolean b = true;
//por padrão, o char é igual a ''
//ocupa 2 bytes, 16 bits
char c = 'a';
char c2 = '1';
//por padrão 0 a nossa variável
//byte ocupa 1 byte memória
byte Byte = 100;
byte bb = -128;//-128 e +127 em 1 byte de memória
//por padrão, o Java abribui 0 a nossa variável
//-32768 + 32767
short camisa = 2000;
//por padrão o java atribui 0 a nossa variável
//-2,147,483,648 + 2,147,486,647
int i = 1;
long l;
float f = 4.4;
double d = 2.2;
}
}