M
◼ Multiple Choice
1) Java is an object-oriented programming language. An object-oriented language
E
(a) Uses structured programming.
(b) Views a program as consisting of objects which communicate through interactions.
(d) All of the above.
Answer: B
D
(c) Functionally breaks down problems into smaller, more manageable problems.
G
2) In Java, the equal sign is used as the ___________ operator.
(a) increment
E
(b) decrement
(c) assignment
(d) negation
E
Answer: C
K
3) In Java, source code is compiled into object code called ______________.
(a) Bit-code
(b) Class code
(c) Method code
(d) Byte-code
Answer: D
4) The hardest kind of error to detect in a computer program is a:
(a) Syntax error
(b) Run-time error
(c) Logic error
(d) All of the above
Answer: C
5) Identify the invalid Java identifier.
(a) 1Week
(b) Week1
(c) amountDue
(d) amount_due
Answer: A
6) What is the value of the variable amountDue?
double price = 2.50;
M
double quantity = 5;
double amountDue = 0;
E
amountDue = price * quantity;
(a) 12
(b)
(c)
12.25
12.5
D
G
(d) 13
Answer: C
E
7) What is the value of 7.52e-5?
(a) 752000.0
(b) 0.0000752
E
(c) 0.000752
(d) 0.00752
K
Answer: B
8) What is the Java expression for 4a 2 + 2b * c?
(a) (4 * a) + (2 * b) * c
(b) (4 * a * a) + ((2 * b) * c)
(c) ((4 * a * a) + (2 * b)) * c
(d) (4 + a * a) + ((2 + b) * c)
Answer: B
Los beneficios de comprar resúmenes en Stuvia estan en línea:
Garantiza la calidad de los comentarios
Compradores de Stuvia evaluaron más de 700.000 resúmenes. Así estas seguro que compras los mejores documentos!
Compra fácil y rápido
Puedes pagar rápidamente y en una vez con iDeal, tarjeta de crédito o con tu crédito de Stuvia. Sin tener que hacerte miembro.
Enfócate en lo más importante
Tus compañeros escriben los resúmenes. Por eso tienes la seguridad que tienes un resumen actual y confiable.
Así llegas a la conclusión rapidamente!
Preguntas frecuentes
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
100% de satisfacción garantizada: ¿Cómo funciona?
Nuestra garantía de satisfacción le asegura que siempre encontrará un documento de estudio a tu medida. Tu rellenas un formulario y nuestro equipo de atención al cliente se encarga del resto.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller MedGeek. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for 18,43 €. You're not tied to anything after your purchase.