This commit is contained in:
jp.av.dev 2020-11-16 01:57:38 -03:00
parent f972fe78ff
commit 91f6878b24
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,13 @@
## Apuntes útiles
*para correr en consola o consulta de sintaxis*
**Compilar :** `$ javac ./NombreArchivo.java`
**Ejecutar :** `$ java ./NombreArchivo.java`
### [Ejemplos básicos]()
- [*Guia de ejercicios*]()
- [*Random-Switch-DoWhile-For*]()
- [*While-DoWhile*]()
- [*Try Catch*]()
- [*Case Try*]()
- [ej. Excepciones]()

View File

@ -0,0 +1,22 @@
//--------------- jp.av.dev@gmail.com ---------------//
//----------------- While, Do While -----------------//
package apuntes.pkg;
import java.util.Scanner;
public class WhileDoWhile {
public static void main(String[] args) {
Scanner s= new Scanner(System.in);
int num=0;
while(num < 3 ){
System.out.println("Hola");
num++;
do{
num = 0;
if (num%2==0)
{System.out.println(num);
num++;}
}while(num < 100);
}
}
}