This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://www.hackerrank.com/challenges/welcome-to-java/problem?isFullScreen=true | |
| public class Solution { | |
| public static void main(String[] args) { | |
| System.out.println("Hello, World."); | |
| System.out.println("Hello, Java."); | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Solution { | |
| public static void main(String[] args) { | |
| System.out.println("Hello, World."); | |
| System.out.println("Hello, Java."); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class Collections { | |
| public static void main(String[] args) { | |
| Map<Integer, String> map = new HashMap<Integer, String>(); | |
| Map<Integer, String> treeMap = new TreeMap<Integer, String>(); | |
| Map<Integer, String> linkedHashMap = new LinkedHashMap<Integer, String>(); | |
| //create set interface | |
| Set<Integer> set = new HashSet<Integer>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dont aprovved by pancho |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function crearAuto() { | |
| class Auto { | |
| constructor(marca, modelo, color, motor, duenios) { | |
| this.marca = marca; | |
| this.modelo = modelo; | |
| this.color = color; | |
| this.motor = motor; | |
| this.duenios = []; | |
| } | |
| agregarDuenio(nombre, apellido, DNI, esDueño) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function crearPersona() { | |
| class Persona { | |
| constructor(nombre, edad, domicilio, amigos) { | |
| this.nombre = nombre; | |
| this.edad = edad; | |
| this.domicilio = domicilio; | |
| this.amigos = []; | |
| } | |
| agregarAmigos(nombre, edad) { | |
| this.amigos.push({ nombre: nombre, edad: edad }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let numeroUno = 0; | |
| let numeroDos = 0; | |
| //numeroUno = parseInt(prompt("Ingrese numero uno")) | |
| //numeroDos = parseInt(prompt("Ingrese numero dos")) | |
| //numeroUno = 2; | |
| //numeroDos = 10; | |
| for(let i = numeroUno + 1; i < numeroDos; i++ ){ | |
| console.log('El numero es ' + ' ' + i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Utilizando un bucle, mostrar la suma, y la media de los numeros | |
| introducidos hasta introducir un numero negativo y ahi mostrar el resultado | |
| - Sumar numeros y media | |
| - Condicion de corte: Numero negativo | |
| */ | |
| /* | |
| let numero = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Programa que pida dos numeros y que nos diga cual es el mayor, el menor y si son iguales | |
| - Pedir dos numeros | |
| - Condicionales > < === | |
| */ | |
| let numeroUno = 30; | |
| let numeroDos = 20; | |
| // === | == |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{ ENTRADA | PIPE }} |
NewerOlder