File tree 1 file changed +50
-0
lines changed
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/java
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ public class Derkopath {
2
+ public static void main (String [] args ) {
3
+
4
+ /*
5
+ Web oficial:
6
+ https://www.java.com/es/
7
+
8
+ Web de aprendizaje:
9
+ https://dev.java/learn/
10
+ */
11
+
12
+ // - Comentarios:
13
+
14
+ // Comentario en una línea
15
+
16
+ /* Comentario en
17
+ múltiples líneas.
18
+ */
19
+
20
+ // - Declara una variable:
21
+
22
+ int variable1 = 0 ;
23
+
24
+ // - Declara una constante
25
+
26
+ static final int CONSTANTE = "constante" ;
27
+
28
+ // - Tipos de datos primitivos:
29
+ byte tipo1 = 0 ;
30
+ short tipo2 = 0 ;
31
+ int tipo3 = 0 ;
32
+ long tipo4 = 0L ;
33
+ float tipo5 = 0.0f ;
34
+ double tipo6 = 0.0d ;
35
+ char tipo7 = 'a' ;
36
+ String tipo8 = "Hola mundo!" ;
37
+ boolean tipo9 = true ;
38
+
39
+ // - Imprimir por terminal:
40
+
41
+ System .out .println ("¡Hola, Java!" );
42
+ }
43
+ }
44
+
45
+
46
+
47
+
48
+
49
+
50
+
You can’t perform that action at this time.
0 commit comments