CJCoding With Joseph
15per day
TitleAction
1
Default int ValueWhat is the default value of an `int` instance variable in Java?...
easy○ Not StartedVariablesSolve
2
Inheritance KeywordWhich keyword is used to inherit a class in Java?...
easy○ Not StartedClassesSolve
5
Array LengthWhat is the output of this code?...
easy○ Not StartedArraysSolve
6
Default ConstructorWhat happens if a class does not have an explicit constructor?...
easy○ Not StartedClassesSolve
7
Random RangeWhat expression generates a random integer between 1 and 10 (inclusive)?...
easy○ Not StartedMethodsSolve
26
Multiple Prints Same LineWhat is the output of the following code?...
easy○ Not StartedPrintingSolve
27
Generic Type ParameterWhat does `<T>` represent in the class declaration `class Box<T> {}`?...
easy○ Not StartedGenerics, ClassesSolve
28
Instantiating a Generic ClassGiven the generic class below, which line correctly creates a Box that holds a S...
easy○ Not StartedGenerics, ClassesSolve
29
Valid Generic Method SignatureWhich of the following is a correctly declared generic method signature in Java?...
easy○ Not StartedGenerics, MethodsSolve
30
Generic Class OutputWhat does this code print?...
easy○ Not StartedGenerics, ClassesSolve
37
JavaFX StageIn JavaFX, what does a `Stage` represent?...
easy○ Not StartedJavaFXSolve
38
JavaFX Entry PointWhich method must you override to launch a JavaFX application?...
easy○ Not StartedJavaFXSolve
39
Button Click HandlerWhat happens when the user clicks the button in this code?...
easy○ Not StartedJavaFXSolve
40
VBox Layout DirectionHow does a `VBox` arrange its children in JavaFX?...
easy○ Not StartedJavaFXSolve
41
TextField InputA user types "Hello" into a `TextField`. What does `textField.getText()` return?...
easy○ Not StartedJavaFXSolve
42
Event Handler PurposeWhat does the `setOnAction()` method do on a JavaFX `Button`?...
easy○ Not StartedJavaFXSolve
43
Scene in JavaFXWhat is the role of a `Scene` in a JavaFX application?...
easy○ Not StartedJavaFXSolve
44
Reading a Scene GraphWhat does this code display in the window?...
easy○ Not StartedJavaFXSolve
45
Window Not AppearingThis JavaFX app compiles and runs but no window appears. What is the bug?...
easy○ Not StartedJavaFXSolve
46
Inline CSS StylingWhat does this line of code do?...
easy○ Not StartedJavaFXSolve
57
HBox LayoutWhat does this code produce?...
easy○ Not StartedJavaFXSolve
58
Prompt TextWhat does `setPromptText()` do on a `TextField`?...
easy○ Not StartedJavaFXSolve
59
CheckBox StateWhat does this code print when the user checks the box?...
easy○ Not StartedJavaFXSolve
60
Padding with InsetsWhat does `setPadding()` do in this code?...
easy○ Not StartedJavaFXSolve
61
StackPane LayersHow does a `StackPane` arrange its children?...
easy○ Not StartedJavaFXSolve
3
Loop OutputWhat is the output of this code?...
medium○ Not StartedLoopsSolve
4
String ComparisonWhat is the output of this code?...
medium○ Not StartedStringsSolve
8
Switch to If ElseWhich if-else statement is equivalent to the given switch statement?...
medium○ Not StartedConditionalsSolve
9
Count Zeros MethodWhat does this method return when called with countZeros({1, 0, 2, 0, 3})?...
medium○ Not StartedArraysSolve
10
Sign Method OutputWhat does this method return when called with getSign(-5)?...
medium○ Not StartedMethodsSolve
11
Array Length vs String LengthWhat is the difference between using `.length` for arrays and `.length()` for st...
medium○ Not StartedStringsSolve
12
Base Case for PowerWhich is the correct base case for a recursive power function power(base, expone...
medium○ Not StartedMethodsSolve
13
Sphere VolumeA Sphere class has a constructor that takes a radius. What should the volume() m...
medium○ Not StartedClassesSolve
14
Count Letter AWhat does this code output?...
medium○ Not StartedLoopsSolve
16
next vs nextLineWhen the input is just `hello` on one line (nothing after it), what will be prin...
medium○ Not StartedScannerSolve
17
Random Integer RangeWhich line generates an integer from 30 to 45 inclusive using `rng`?...
medium○ Not StartedMethodsSolve
18
String ImmutabilityWhat is printed?...
medium○ Not StartedStringsSolve
19
Array AliasingWhat is printed?...
medium○ Not StartedArraysSolve
20
Loop TotalWhat is the final value of `sum` after the loop finishes?...
medium○ Not StartedLoopsSolve
21
Switch Fall ThroughWhat is printed when `x` is 2?...
medium○ Not StartedConditionalsSolve
22
Method Overloading PickWhich method is called by `printValue(5)`?...
medium○ Not StartedMethodsSolve
23
Constructor and FieldsWhat is printed?...
medium○ Not StartedClassesSolve
24
Enhanced For Loop ChangeWhat is printed?...
medium○ Not StartedArraysSolve
25
Integer Division ResultWhat is printed?...
medium○ Not StartedMethodsSolve
31
Bounded Type ParameterWhat does the type constraint `<T extends Number>` mean when used as a generic t...
medium○ Not StartedGenerics, ClassesSolve
32
Generic Max MethodWhat does this generic method return when called as `max(3, 7)`?...
medium○ Not StartedGenerics, MethodsSolve
33
Multiple Type ParametersWhich declaration correctly defines a generic class with two independent type pa...
medium○ Not StartedGenerics, ClassesSolve
34
Upper Bounded WildcardWhich statement about a parameter typed as `List<? extends Number>` is true?...
medium○ Not StartedGenerics, MethodsSolve
35
Generic Method Type InferenceWhat does this code print?...
medium○ Not StartedGenerics, MethodsSolve
47
Counter Button LogicWhat happens each time the button is clicked?...
medium○ Not StartedJavaFXSolve
48
Node in Two ParentsWhat happens when this code runs?...
medium○ Not StartedJavaFXSolve
49
BorderPane LayoutWhat layout does this code produce?...
medium○ Not StartedJavaFXSolve
50
GridPane Cell PositionWhere does the `Button` appear in the grid?...
medium○ Not StartedJavaFXSolve
51
Background Thread UI UpdateThis code throws an `IllegalStateException` at runtime. What is the issue?...
medium○ Not StartedJavaFXSolve
52
Property BindingWhat does this property binding do?...
medium○ Not StartedJavaFXSolve
53
RadioButton ToggleGroupWhat does the `ToggleGroup` do in this code?...
medium○ Not StartedJavaFXSolve
54
Missing ChildrenThe window appears but is completely blank. What is the bug?...
medium○ Not StartedJavaFXSolve
55
ComboBox SelectionWhat does this code do when the user selects a color from the dropdown?...
medium○ Not StartedJavaFXSolve
56
ObservableList and ListViewAfter the "Add" button is clicked once, then the "Remove" button is clicked once...
medium○ Not StartedJavaFXSolve
62
Scene SwitchingWhat happens when the "Go to Page 2" button is clicked?...
medium○ Not StartedJavaFXSolve
63
VBox AlignmentWhere do the children appear in the window?...
medium○ Not StartedJavaFXSolve
64
Alert DialogWhat does this code do when the button is clicked?...
medium○ Not StartedJavaFXSolve
65
KeyEvent HandlerWhat does this code do?...
medium○ Not StartedJavaFXSolve
66
FXML Controller WiringWhat does the `@FXML` annotation do in a JavaFX controller class?...
medium○ Not StartedJavaFXSolve
15
Evenly DivisibleWhat does this method return for isEvenlyDivisible(20, 7)?...
hard○ Not StartedMethodsSolve
36
Raw Type and ClassCastExceptionThis code compiles (with an unchecked warning suppressed). What happens when it ...
hard○ Not StartedGenerics, ClassesSolve