-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEjercicioTema1
More file actions
53 lines (35 loc) · 1.28 KB
/
Copy pathEjercicioTema1
File metadata and controls
53 lines (35 loc) · 1.28 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.openbootcamp;
public class EjercicioTipos {
public static void main(String[] args) {
System.out.println("1. Numericos");
// 1. numericos
System.out.println("1.1 enteros");
System.out.println("byte = 5"+ "; ");
System.out.println("short = 10"+ "; ");
System.out.println("int = 30"+ "; ");
System.out.println("long = 100"+ "; ");
// 1.1 enteros
byte variable1 = 5;
short variable2 = 10;
int variable3 = 30;
long variable4 = 100;
System.out.println("1.2 decimales");
// 1.2 decimales
System.out.println("floan = 5.5f"+ "; ");
System.out.println("double = 10.5d"+ "; ");
float variable5 = 5.5f;
double variable6 = 10.5d;
System.out.println("2. Booleanos");
// 2. booleanos
System.out.println("boolean = false"+ ";");
System.out.println("boolean = true"+ ";");
boolean variable7 = false;
boolean variable8 = true;
System.out.println("3.Texto");
// 3. texto
System.out.println("char = 'a'");
System.out.println("String = Lorent ipsum dolor sit amet,..");
char variable9 = 'a';
String variable10 = "lorent ipsum dolor sit amet..";
}
}