Académique Documents
Professionnel Documents
Culture Documents
Which of the following are valid Java identifiers? (Choose all that apply) *
java.lang
true
1980_s
_helloWorld
A$B
Public
The compile as is
Line 6 generates a compiler error
Line 7 generates a compiler error
Given the following class, which of the following is true? (Choose all that apply) *
Given the following classes, which of the following can independently replace INSERT
IMPORTS HERE to make the code compile? (Choose all that apply) *
import aquarium.*.Jelly;
import aquarium.jellies.Jelly.*;
CUESTIONARIO 1
import aquarium.jellies.*;
None of these can make the code compile.
import aquarium.jellies.Jelly;
import aquarium.*;
Given the following classes, what is the maximum number of imports that can be
removedand have the code still compile? *
1
3
0
4
2
Does not compile
CUESTIONARIO 1
Given the following classes, which of the following snippets can be inserted in place
ofINSERT IMPORTS HERE and have the code compile? (Choose all that apply) *
Given the following class, which of the following calls print out Blue Jay? (Choose all that
apply)
Which of the following legally fill in the blank so you can run the main() method from
thecommand line? (Choose all that apply) public satatic void main ( ________________) *
String... $n
String _Names[]
String[] 123
String[] _names
String names
None of the above
String abc[]
Which of the following are legal entry point methods that can be run from the command
line? (Choose all that apply) *
package my.directory.named.a;
package my.directory.named.A;
package named.a;
package named.A;
package a;
package A;
Does not compile
Which of the following lines of code compile? (Choose all that apply) *
double d1 = 1_234_.0;
None of the above.
double d2 = 1_234._0;
int i1 = 1_234;
double d3 = 1_234.0_;
double d4 = 1_234.0;
Given the following class, whitch of the following lines of code can remplace INSERT
CODE HERE to make the code compile (Choose all that apply) *
CUESTIONARIO 1
int amount=9L;
int amount =0b101;
int amount =0xE;
double amount =0xE;
double amount=1_2_._0_0;
int amount=1_2_;
None of the above
Which represent the order in which the following statements can be assembled into a
program that will compile successfully? (Choose all that apply) *
B, A
A, C
A, B
C, B, A
C, A
B, C, A
A, B, C
CUESTIONARIO 1
Suppose we have a class named Rabbit. Which of the following statements are
true?(Choose all that apply) *
The Rabbit object from line 3 is first eligible for garbage collection immediately
following line 8
The Rabbit object from line 4 is first eligible for garbage collection immediately
following line 12
The Rabbit object from line 4 is first eligible for garbage collection immediately
following line 11
The Rabbit object from line 3 is first eligible for garbage collection immediately
following line 6
The Rabbit object from line 3 is first eligible for garbage collection immediately
following line 12
The Rabbit object from line 4 is first eligible for garbage collection immediately
following line 9
CUESTIONARIO 1
Which of the following are true statements? (Choose all that apply) *