TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS...
Transcript of TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS...
![Page 1: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/1.jpg)
TIPOS DE DATOS EN JAVA
•byte•short•int•long•float•double•boolean•char
![Page 2: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/2.jpg)
OPERADORES EN JAVA
![Page 3: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/3.jpg)
SECUENCIAS DE ESCAPE EN JAVA
Las secuencias de escapeson valores que se puedenincluir dentro de losmensajes, también sepueden guardar comovariables tipo String, estassecuencias nos permiten:imprimir una nueva línea,dar un espacio detabulador, incluir unretorno de carro entreotros.
![Page 4: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/4.jpg)
INSTRUCCIONES DE CONTROL
SELECTIVAS
•ifif (condición) {sentencia; } Else { sentencia;}
•else ifif (expresion1) {
accion1; }else if (expresion2) {
accion2; }
•switch
Permite cualquier cantidad derutas de ejecución posibles.. Unswitch funciona con los datosprimitivos byte, short, char eint.
La condición es unaexpresión booleana. Lasentencia se ejecutasolamente si la expresiónbooleana es verdadera.
![Page 5: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/5.jpg)
INSTRUCCIONES DE CONTROLREPETITIVAS
•whilewhile (expresión) {
sentencia(s)}
•do whiledo {
sentencia(s)} while (expresión);
•forfor (inicialización; terminación; incremento) {sentencia(s);
}
Ejecuta un bloque de sentencias contínuamente mientrasuna condición sea verdadera «true».
La diferencia entre do-while y while es que do-whileevalúa su expresión al final en lugar de al inicio. Por lotanto las sentencias del bloque do siempre se ejecutanal menos una vez,.
Proporciona una forma compactade recorrer un rango de valores.
![Page 6: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/6.jpg)
if
![Page 7: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/7.jpg)
if else
![Page 8: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/8.jpg)
switch
![Page 9: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/9.jpg)
while
![Page 10: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/10.jpg)
while
![Page 11: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/11.jpg)
do while
![Page 12: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/12.jpg)
do while
![Page 13: TIPOS DE DATOS EN JAVAjavasoftware.weebly.com/uploads/7/0/1/4/7014891/proe-i04_tipos_d… · TIPOS DE DATOS EN JAVA •byte •short •int •long •float •double •boolean •char](https://reader036.fdocuments.es/reader036/viewer/2022062317/5fb9b8d72567ec34065351e5/html5/thumbnails/13.jpg)
for