SlideShare una empresa de Scribd logo
1 de 32
SCJP –  Sección 2: Control de Flujo, Exceptions y Assertions José Miguel Selman G.  (jose.selman@gmail.com)‏
SCJP –  Objetivos exámen ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],* Extraído desde:  http://www.sun.com/training/catalog/courses/CX-310-055.xml
Introducción ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
if-else ,[object Object],[object Object],[object Object],if (expresión booleana) { // la expresión es verdadera, ==> dentro de la sentencia if } else { // la expresión es falsa, ==> dentro de la sentencia else } if (x > 3)  System.out.println(“x es mayor a 3”); else  System.out.println(“x es menos o igual a 3”);
else if ,[object Object],if (x >= 1 && x < 3) { // x es 1 o 2 } else if ( x >= 3 && x < 5 ) { // x es 3 o 4 } else if ( x >= 5 && x < 7 ) { // x es 5 o 6 } else { // x es mayor que 7 }
Expresiones válidas ,[object Object],[object Object],[object Object],[object Object],[object Object],Ojo con: ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
switch switch (expresión) { case constante1: // Código case constante2: // Código default: // Código } ,[object Object],int largo = “abc”.length();  switch (largo) { case 1: System.out.println(“1”);   break; case 2: System.out.println(“2”);   break; default: System.out.println(“default”); }
[object Object],[object Object],int largo = 1;  switch (largo) { case 1: System.out.println(“1”); case 2: System.out.println(“2”); default: System.out.println(“default”); } int largo = 1;  switch (largo) { case 1:  case 2: System.out.println(“1 o 2”);   break; default: System.out.println(“default”); }
Fall-Through y default int i = 11; switch(i) { case 1: System.out.println(“1”); default: System.out.println(“default”); case 2: System.out.println(“2”); case 3: System.out.println(“3”); } ,[object Object],[object Object]
switch ,[object Object],[object Object],[object Object]
while while(expresión booleana) { // hacer algo } ,[object Object],[object Object],int x = 10; while(x > 10) { System.out.println(“dentro del loop”); } System.out.println(“fuera del loop”); ,[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
do-while do { // Código } while (expresión booleana); ,[object Object],int x = 10; do {   System.out.println(“dentro del loop”); } while(x > 10);  System.out.println(“fuera del loop”); ,[object Object],[object Object]
for ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],for ( Inicialización ;  Condición ;  Iteración ) { // instrucciones }  ,[object Object],for ( int i=0; i<10; i++) { } for (int i=10, j=3; y>3; y++) { } for (int x=0; x < 10 && y-- > 2 | x == 3; x++)
for‏ ,[object Object],[object Object],[object Object],for (declaración: expresión) { // instrucciones }  Por ejemplo:  String[] numeros = {“uno”, “dos”, “tres”, “cuatro”, “cinco”}; for(String s: numeros) { System.out.println(s); }
break y continue ,[object Object],[object Object],[object Object],for(int i=1; i<10; i++) { if ( i == 5 || i == 7 ) { continue; }  System.out.println(i); } ,[object Object]
Labels ,[object Object],[object Object],[object Object],[object Object],boolean condicion = true; externo: for(int i=0; i<10; i++) { while(condicion) { System.out.println(“Hola”); break externo; } System.out.println(“Esto no se imprimirá”); } System.out.println(“Chao”); ,[object Object]
Exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
try { // Intentamos abrir un archivo para lectura } catch(NoTenemosLosPermisosSuficientes e) { // Mostrar mensaje de error al usuario } ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Stack de Ejecución main() metodo1() main() metodo1() metodo2() main() main() metodo1() main() La ejecución se inicia con el método main main llama a metodo1 metodo1 llama a metodo2 metodo2 retorna metodo1 retorno y main llama a metodo3 metodo3() main() metodo3 retorna
Exception ducking ,[object Object],[object Object],[object Object],public  int cuentaLineasArchivo(String filename) throws IOException { BufferedReader br; int lineas = 0; try { br = new BufferedReader(new FileReader(filename)); while (br.readLine() != null) {  lineas++; } } finally { if (br != null)  br.close();  } return lineas; }
[object Object],public  int cuentaLineasArchivo(String filename) throws IOException { BufferedReader br; int lineas = 0; try { br = new BufferedReader(new FileReader(filename)); while (br.readLine() != null) {  lineas++; } } catch(IOException ioe) { ioe.printStackTrace(); // o extraer el mensaje usando ioe.getMessage(); throw ioe; } finally { if (br != null)  br.close();  } return lineas; }
Tipos de Exceptions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Jerarquía de Excepciones java.lang.Object java.lang.Throwable java.lang.Error java.lang.Exception java.lang.RuntimeException Fuente: Sun Certified Programmer for Java 5 Study Guide, Kathy Sierra & Bert Bates, McGraw Hill … … …
Atrapar excepciones ,[object Object],[object Object],try { // ... } catch(NumerFormatException e) { // ... } catch(Exception e) { // ...  } try { // ... } catch(Exception e) { // ... } catch(NumerFormatException e) { // ...  } Correcto Incorrecto
Excepciones y Errores comunes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Algunas Comunes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Algunas Comunes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Assertions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Habilitación Assertions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Usos correctos de Assertions ,[object Object],[object Object],[object Object],[object Object]
Recursos ,[object Object],[object Object],[object Object]

Más contenido relacionado

La actualidad más candente

Sentencia de control
Sentencia de controlSentencia de control
Sentencia de controlStalyn Cruz
 
Tema 3 sentencias de control de java por gio
Tema 3   sentencias de control de java por gioTema 3   sentencias de control de java por gio
Tema 3 sentencias de control de java por gioRobert Wolf
 
Certificación java 6 cap 5
Certificación java 6 cap 5Certificación java 6 cap 5
Certificación java 6 cap 5srBichoRaro
 
DAW-Estructuras de control
DAW-Estructuras de controlDAW-Estructuras de control
DAW-Estructuras de controlvay82
 
Estructuras de Control - Ivan Walkes Mc.
Estructuras de Control - Ivan Walkes Mc.Estructuras de Control - Ivan Walkes Mc.
Estructuras de Control - Ivan Walkes Mc.Ivan A. Walkes Mc.
 
Estructuras de control C++
Estructuras de control C++Estructuras de control C++
Estructuras de control C++LOANNELMARIN
 
Instrucciones de control de salto
Instrucciones de control de saltoInstrucciones de control de salto
Instrucciones de control de saltoAbrirllave
 
Estructuras algoritnicas de control
Estructuras algoritnicas de controlEstructuras algoritnicas de control
Estructuras algoritnicas de controlMiguel Martinez
 
Estructuras repetitivas
Estructuras repetitivasEstructuras repetitivas
Estructuras repetitivasyance1
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de controlparada137
 
TEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓN
TEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓNTEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓN
TEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓNAnyeni Garay
 
Estructuras de control
Estructuras de  controlEstructuras de  control
Estructuras de controlmellcv
 
Estructura de control repetitiva
Estructura de control repetitivaEstructura de control repetitiva
Estructura de control repetitivavillandri pachco
 
Estructura de un programa
Estructura de un programaEstructura de un programa
Estructura de un programaFelipe Romano
 

La actualidad más candente (19)

Sentencia de control
Sentencia de controlSentencia de control
Sentencia de control
 
Tema 3 sentencias de control de java por gio
Tema 3   sentencias de control de java por gioTema 3   sentencias de control de java por gio
Tema 3 sentencias de control de java por gio
 
Sentencias de control
Sentencias de controlSentencias de control
Sentencias de control
 
Certificación java 6 cap 5
Certificación java 6 cap 5Certificación java 6 cap 5
Certificación java 6 cap 5
 
15 Curso de POO en java - estructuras repetitivas
15 Curso de POO en java - estructuras repetitivas15 Curso de POO en java - estructuras repetitivas
15 Curso de POO en java - estructuras repetitivas
 
DAW-Estructuras de control
DAW-Estructuras de controlDAW-Estructuras de control
DAW-Estructuras de control
 
Manual
ManualManual
Manual
 
Estructuras de Control - Ivan Walkes Mc.
Estructuras de Control - Ivan Walkes Mc.Estructuras de Control - Ivan Walkes Mc.
Estructuras de Control - Ivan Walkes Mc.
 
Estructuras de control C++
Estructuras de control C++Estructuras de control C++
Estructuras de control C++
 
Instrucciones de control de salto
Instrucciones de control de saltoInstrucciones de control de salto
Instrucciones de control de salto
 
Estructuras algoritnicas de control
Estructuras algoritnicas de controlEstructuras algoritnicas de control
Estructuras algoritnicas de control
 
Estructuras repetitivas
Estructuras repetitivasEstructuras repetitivas
Estructuras repetitivas
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de control
 
Estructuras de control
Estructuras de controlEstructuras de control
Estructuras de control
 
TEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓN
TEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓNTEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓN
TEMA Nº 8: CONTROL DE EJECUCIÓN Y MANTENIMIENTO DE SESIÓN
 
Diagramas De Flujo
Diagramas De FlujoDiagramas De Flujo
Diagramas De Flujo
 
Estructuras de control
Estructuras de  controlEstructuras de  control
Estructuras de control
 
Estructura de control repetitiva
Estructura de control repetitivaEstructura de control repetitiva
Estructura de control repetitiva
 
Estructura de un programa
Estructura de un programaEstructura de un programa
Estructura de un programa
 

Destacado

Rochelle Blackman Slivka
Rochelle Blackman SlivkaRochelle Blackman Slivka
Rochelle Blackman SlivkaRagenDrew
 
EY-introducing-EYs-advisory-services
EY-introducing-EYs-advisory-servicesEY-introducing-EYs-advisory-services
EY-introducing-EYs-advisory-servicesStephen Stone
 
สุขภาพที่ดีเริ่มต้นที่
สุขภาพที่ดีเริ่มต้นที่สุขภาพที่ดีเริ่มต้นที่
สุขภาพที่ดีเริ่มต้นที่guestcfd317
 
Url Shortening Services
Url Shortening ServicesUrl Shortening Services
Url Shortening ServicesAltan Khendup
 
Performance Load Cache
Performance Load CachePerformance Load Cache
Performance Load CacheAltan Khendup
 
Lambda Architecture The Hive
Lambda Architecture The HiveLambda Architecture The Hive
Lambda Architecture The HiveAltan Khendup
 

Destacado (8)

Rochelle Blackman Slivka
Rochelle Blackman SlivkaRochelle Blackman Slivka
Rochelle Blackman Slivka
 
EY-introducing-EYs-advisory-services
EY-introducing-EYs-advisory-servicesEY-introducing-EYs-advisory-services
EY-introducing-EYs-advisory-services
 
สุขภาพที่ดีเริ่มต้นที่
สุขภาพที่ดีเริ่มต้นที่สุขภาพที่ดีเริ่มต้นที่
สุขภาพที่ดีเริ่มต้นที่
 
Url Shortening Services
Url Shortening ServicesUrl Shortening Services
Url Shortening Services
 
Performance Load Cache
Performance Load CachePerformance Load Cache
Performance Load Cache
 
1234
12341234
1234
 
Lambda Architecture The Hive
Lambda Architecture The HiveLambda Architecture The Hive
Lambda Architecture The Hive
 
Presentation1
Presentation1Presentation1
Presentation1
 

Similar a Scjp Jug Section 2 Flow Control

SCJP, Clase 5: Control de Flujo
SCJP, Clase 5: Control de FlujoSCJP, Clase 5: Control de Flujo
SCJP, Clase 5: Control de Flujoflekoso
 
Guia demanejodeexcepcionesaserciones
Guia demanejodeexcepcionesasercionesGuia demanejodeexcepcionesaserciones
Guia demanejodeexcepcionesasercionesjbersosa
 
Iv unidad estructuras de control
Iv unidad estructuras de controlIv unidad estructuras de control
Iv unidad estructuras de controlmariaisabelg
 
Mas sobre excepciones
Mas sobre excepcionesMas sobre excepciones
Mas sobre excepcionesjbersosa
 
Lenguaje de programacion java, conceptos
Lenguaje de programacion java, conceptosLenguaje de programacion java, conceptos
Lenguaje de programacion java, conceptosmellcv
 
Clase lenguaje c xxxxxx
Clase lenguaje c xxxxxxClase lenguaje c xxxxxx
Clase lenguaje c xxxxxxMar15marian
 
Clase lenguaje c xxxxxx
Clase lenguaje c xxxxxxClase lenguaje c xxxxxx
Clase lenguaje c xxxxxxMar15marian
 
Clase lenguaje c
Clase lenguaje c Clase lenguaje c
Clase lenguaje c Mar15marian
 
Php04 estructuras control
Php04 estructuras controlPhp04 estructuras control
Php04 estructuras controlJulio Pari
 
Estructuras condicionales
Estructuras condicionalesEstructuras condicionales
Estructuras condicionalesSTEVENZAFIRO
 

Similar a Scjp Jug Section 2 Flow Control (20)

Programación básica
Programación básicaProgramación básica
Programación básica
 
SCJP, Clase 5: Control de Flujo
SCJP, Clase 5: Control de FlujoSCJP, Clase 5: Control de Flujo
SCJP, Clase 5: Control de Flujo
 
Guia demanejodeexcepcionesaserciones
Guia demanejodeexcepcionesasercionesGuia demanejodeexcepcionesaserciones
Guia demanejodeexcepcionesaserciones
 
Arreglos Expresiones y Control de Flujo
Arreglos Expresiones y Control de FlujoArreglos Expresiones y Control de Flujo
Arreglos Expresiones y Control de Flujo
 
Iv unidad estructuras de control
Iv unidad estructuras de controlIv unidad estructuras de control
Iv unidad estructuras de control
 
Mas sobre excepciones
Mas sobre excepcionesMas sobre excepciones
Mas sobre excepciones
 
Repaso c
Repaso cRepaso c
Repaso c
 
lp1t3.pdf
lp1t3.pdflp1t3.pdf
lp1t3.pdf
 
Lenguaje de programacion java, conceptos
Lenguaje de programacion java, conceptosLenguaje de programacion java, conceptos
Lenguaje de programacion java, conceptos
 
P1
P1P1
P1
 
Estructuras de Control
Estructuras de ControlEstructuras de Control
Estructuras de Control
 
Clase lenguaje c xxxxxx
Clase lenguaje c xxxxxxClase lenguaje c xxxxxx
Clase lenguaje c xxxxxx
 
Clase lenguaje c xxxxxx
Clase lenguaje c xxxxxxClase lenguaje c xxxxxx
Clase lenguaje c xxxxxx
 
Clase lenguaje c
Clase lenguaje c Clase lenguaje c
Clase lenguaje c
 
Lenguaje c
Lenguaje cLenguaje c
Lenguaje c
 
Ejercicios3
Ejercicios3Ejercicios3
Ejercicios3
 
Java básico
Java  básicoJava  básico
Java básico
 
Php04 estructuras control
Php04 estructuras controlPhp04 estructuras control
Php04 estructuras control
 
Try catch
Try catchTry catch
Try catch
 
Estructuras condicionales
Estructuras condicionalesEstructuras condicionales
Estructuras condicionales
 

Último

El uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFELEl uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFELmaryfer27m
 
Tecnologias Starlink para el mundo tec.pptx
Tecnologias Starlink para el mundo tec.pptxTecnologias Starlink para el mundo tec.pptx
Tecnologias Starlink para el mundo tec.pptxGESTECPERUSAC
 
El uso de las tic en la vida ,lo importante que son
El uso de las tic en la vida ,lo importante  que sonEl uso de las tic en la vida ,lo importante  que son
El uso de las tic en la vida ,lo importante que son241514984
 
FloresMorales_Montserrath_M1S3AI6 (1).pptx
FloresMorales_Montserrath_M1S3AI6 (1).pptxFloresMorales_Montserrath_M1S3AI6 (1).pptx
FloresMorales_Montserrath_M1S3AI6 (1).pptx241522327
 
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfSergioMendoza354770
 
Segunda ley de la termodinámica TERMODINAMICA.pptx
Segunda ley de la termodinámica TERMODINAMICA.pptxSegunda ley de la termodinámica TERMODINAMICA.pptx
Segunda ley de la termodinámica TERMODINAMICA.pptxMariaBurgos55
 
LAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptx
LAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptxLAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptx
LAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptxAlexander López
 
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxMedidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxaylincamaho
 
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptxCrear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptxNombre Apellidos
 
Hernandez_Hernandez_Practica web de la sesion 11.pptx
Hernandez_Hernandez_Practica web de la sesion 11.pptxHernandez_Hernandez_Practica web de la sesion 11.pptx
Hernandez_Hernandez_Practica web de la sesion 11.pptxJOSEMANUELHERNANDEZH11
 
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).pptLUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).pptchaverriemily794
 
Mapa-conceptual-del-Origen-del-Universo-3.pptx
Mapa-conceptual-del-Origen-del-Universo-3.pptxMapa-conceptual-del-Origen-del-Universo-3.pptx
Mapa-conceptual-del-Origen-del-Universo-3.pptxMidwarHenryLOZAFLORE
 
La Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdfLa Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdfjeondanny1997
 
dokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.pptdokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.pptMiguelAtencio10
 
tics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptxtics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptxazmysanros90
 
TEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.ppt
TEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.pptTEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.ppt
TEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.pptJavierHerrera662252
 
Excel (1) tecnologia.pdf trabajo Excel taller
Excel  (1) tecnologia.pdf trabajo Excel tallerExcel  (1) tecnologia.pdf trabajo Excel taller
Excel (1) tecnologia.pdf trabajo Excel tallerValentinaTabares11
 
AREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPO
AREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPOAREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPO
AREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPOnarvaezisabella21
 
GonzalezGonzalez_Karina_M1S3AI6... .pptx
GonzalezGonzalez_Karina_M1S3AI6... .pptxGonzalezGonzalez_Karina_M1S3AI6... .pptx
GonzalezGonzalez_Karina_M1S3AI6... .pptx241523733
 
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6    CREAR UN RECURSO MULTIMEDIAActividad integradora 6    CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA241531640
 

Último (20)

El uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFELEl uso delas tic en la vida cotidiana MFEL
El uso delas tic en la vida cotidiana MFEL
 
Tecnologias Starlink para el mundo tec.pptx
Tecnologias Starlink para el mundo tec.pptxTecnologias Starlink para el mundo tec.pptx
Tecnologias Starlink para el mundo tec.pptx
 
El uso de las tic en la vida ,lo importante que son
El uso de las tic en la vida ,lo importante  que sonEl uso de las tic en la vida ,lo importante  que son
El uso de las tic en la vida ,lo importante que son
 
FloresMorales_Montserrath_M1S3AI6 (1).pptx
FloresMorales_Montserrath_M1S3AI6 (1).pptxFloresMorales_Montserrath_M1S3AI6 (1).pptx
FloresMorales_Montserrath_M1S3AI6 (1).pptx
 
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdfPARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
PARTES DE UN OSCILOSCOPIO ANALOGICO .pdf
 
Segunda ley de la termodinámica TERMODINAMICA.pptx
Segunda ley de la termodinámica TERMODINAMICA.pptxSegunda ley de la termodinámica TERMODINAMICA.pptx
Segunda ley de la termodinámica TERMODINAMICA.pptx
 
LAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptx
LAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptxLAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptx
LAS_TIC_COMO_HERRAMIENTAS_EN_LA_INVESTIGACIÓN.pptx
 
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptxMedidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
Medidas de formas, coeficiente de asimetría y coeficiente de curtosis.pptx
 
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptxCrear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
Crear un recurso multimedia. Maricela_Ponce_DomingoM1S3AI6-1.pptx
 
Hernandez_Hernandez_Practica web de la sesion 11.pptx
Hernandez_Hernandez_Practica web de la sesion 11.pptxHernandez_Hernandez_Practica web de la sesion 11.pptx
Hernandez_Hernandez_Practica web de la sesion 11.pptx
 
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).pptLUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
LUXOMETRO EN SALUD OCUPACIONAL(FINAL).ppt
 
Mapa-conceptual-del-Origen-del-Universo-3.pptx
Mapa-conceptual-del-Origen-del-Universo-3.pptxMapa-conceptual-del-Origen-del-Universo-3.pptx
Mapa-conceptual-del-Origen-del-Universo-3.pptx
 
La Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdfLa Electricidad Y La Electrónica Trabajo Tecnología.pdf
La Electricidad Y La Electrónica Trabajo Tecnología.pdf
 
dokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.pptdokumen.tips_36274588-sistema-heui-eui.ppt
dokumen.tips_36274588-sistema-heui-eui.ppt
 
tics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptxtics en la vida cotidiana prepa en linea modulo 1.pptx
tics en la vida cotidiana prepa en linea modulo 1.pptx
 
TEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.ppt
TEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.pptTEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.ppt
TEMA 2 PROTOCOLO DE EXTRACCION VEHICULAR.ppt
 
Excel (1) tecnologia.pdf trabajo Excel taller
Excel  (1) tecnologia.pdf trabajo Excel tallerExcel  (1) tecnologia.pdf trabajo Excel taller
Excel (1) tecnologia.pdf trabajo Excel taller
 
AREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPO
AREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPOAREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPO
AREA TECNOLOGIA E INFORMATICA TRABAJO EN EQUIPO
 
GonzalezGonzalez_Karina_M1S3AI6... .pptx
GonzalezGonzalez_Karina_M1S3AI6... .pptxGonzalezGonzalez_Karina_M1S3AI6... .pptx
GonzalezGonzalez_Karina_M1S3AI6... .pptx
 
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6    CREAR UN RECURSO MULTIMEDIAActividad integradora 6    CREAR UN RECURSO MULTIMEDIA
Actividad integradora 6 CREAR UN RECURSO MULTIMEDIA
 

Scjp Jug Section 2 Flow Control

  • 1. SCJP – Sección 2: Control de Flujo, Exceptions y Assertions José Miguel Selman G. (jose.selman@gmail.com)‏
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. Stack de Ejecución main() metodo1() main() metodo1() metodo2() main() main() metodo1() main() La ejecución se inicia con el método main main llama a metodo1 metodo1 llama a metodo2 metodo2 retorna metodo1 retorno y main llama a metodo3 metodo3() main() metodo3 retorna
  • 21.
  • 22.
  • 23.
  • 24. Jerarquía de Excepciones java.lang.Object java.lang.Throwable java.lang.Error java.lang.Exception java.lang.RuntimeException Fuente: Sun Certified Programmer for Java 5 Study Guide, Kathy Sierra & Bert Bates, McGraw Hill … … …
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.