Documentos de Académico
Documentos de Profesional
Documentos de Cultura
09 Respuesta Ejercicio Variables
09 Respuesta Ejercicio Variables
int
anInt
i
i1
1
thing1
1thing
ONE-HUNDRED
ONE_HUNDRED
something2do
Respuesta:
int
anInt
i
i1
1
thing1
1thing
ONE-HUNDRED
ONE_HUNDRED
something2do
1
Oracle10g JAVA Programming
Ejercicios:
Solución:
Ésta es nuestra solución a los tres ejercicios, llamada MinVariablesDemo, con las diferencias en
rojo:
// integers
byte smallestByte = Byte.MIN_VALUE;
short smallestShort = Short.MIN_VALUE;
int smallestInteger = Integer.MIN_VALUE;
long smallestLong = Long.MIN_VALUE;
// real numbers
float smallestFloat = Float.MIN_VALUE;
double smallestDouble = Double.MIN_VALUE;
if (Character.isLowerCase(aChar)) {
System.out.println("The character " + aChar + " is lower case.");
} else {
System.out.println("The character " + aChar + " is upper case.");
}
System.out.println("The value of aBoolean is " + aBoolean);
}
}