You are on page 1of 2

EVALUACIN DEL APRENDIZAJE

MODULE 3 IDENTIFIERS, KEYWORDS AND TYPES

Nombre:____________________________________________________
Fecha:__________e-mail:______________________________________
Tiempo para resolverlo: 15 minutos.
1. Which of the following expression is illegal at compile time?(choose
one)
a) double myvalue = 3598.2345F;
b) int mynew = 3598.2345;
c) float myvar = (float) 3598.2345;
d) int myval= (int) A;
2. Which of the following expression is legal at compile time? (choose
one)
a) String x = "10"; int y = 9 ; x += y;
b) String x = "10"; int y = 9 ; if ( x = = y ) { }
c) String x = "10"; int y = 9 ; y+=x;
d) All of the above are legal expressions.
3. Which of the following are primitive data types? (choose one)
a) float, int, double.
b) short, byte, long.
c) A and B are correct.
d) None of the above.
4. Underline the valid declarations for an identifiers(choose five)
a)
b)
c)
d)
e)
j)

int
int
int
int
int
int

.f;
f) int 7g;
_a;
g) int _$;
$c;
h) int -d;
:b;
i) int e#;
______2_w;
this_is_a_very_detailed_name_for_an_identifier;

Which one of the following arent java keywords(choose three).


a)
b)
c)
d)
e)

int
boolean
and
else
struct

f)
g)
h)
i)
j)

for
extend
delete
static
class

k)
l)
m)
n)
o)

return
private
not
new
string

6. Write the 8 primitive types in Java Programming Language:


double
long
Lgicos (1)
Texto (1)
Enteros (4)
Punto Flotante (2)

short

float

char

int

bolean
byte

____boolean________________
____char______________________
____int, long, byte, short______
______double, float______________

7. A floating point literal in Java is treated as a: (choose one)


a) Float
b) double
c) Float
d) Double
8. Which of these are legal values for a bolean: (choose one)
a)
b)
c)
d)
e)

true, false
1,0
TRUE, FALSE
TRUE, FALSE, true, false
true, false, 1, 0

9. What is the bit-depth of a byte? (choose one)


a) 7 bits
b) 8 bits

You might also like