This Computer Science Java Quiz assesses knowledge of Java programming fundamentals, including array handling, loop structures, and class organization. It is ideal for learners looking to test their understanding of basic Java concepts and improve their coding skills.
Float
Boolean
Char
Double
Both a and d
Rate this question:
Index
Count
Increment
Iteration
None of these choices
Rate this question:
When you have multiple conditions
When a condition will end the loop
When you know the number of times the loop should execute
When you are performing a specific java function
None of the above
Rate this question:
String
Int
Double
Char
None of the above
Rate this question:
Color
Image
Scanner
Graphics2D
A,b and d
Rate this question:
A normal public method
A public method that shares the same name as the class, but cannot return a value
A private method which can only be performed if the user types in a password
A normal private method
None of the above
Rate this question:
Import java.util.*;
Import java.awt.%;
Import java.awt;
Import java.awt.*;
None of the above
Rate this question:
A method with an undefined type
A method with too many parameters
A method with the same name, but different parameters
A method called inside an infinite loop
A method with a syntax error
Rate this question:
A package
A list
An iteration
An integer
None of the above
Rate this question:
For mainly allowing user-input to show up on the screen.
Creating user interfaces and for painting graphics and images.
To perform math functions such as multiplication or addition.
To determine the age of an individual based on the Gregorian calender
None of the above
Rate this question:
A group of java classes with a similar purpose
A group of java objects
A group of java methods with a similar purpose
A series of code blocks
A list of parameters
Rate this question:
Double number;
Int number = 4;
Float number = new float;
None of the above
Rate this question:
Public void drawRectangle(100, 200);
DrawRectangle(100, 200);
Public void drawRectangle(int length, int width);
Public void drawRectangle(100, 200)
DrawRectangle(100, 200)
Rate this question:
HelloWorld.java!
HelloWorld.java
Class HelloWorld.java
Public class HelloWorld.java
None of the above
Rate this question:
A driver class
A driving class
An automatic class
A stand-alone class
None of the above
Rate this question:
Int[8] numbers = 9;
Numbers[2] = 2;
Int[9] numbers = 10;
Numbers[5] = 6;
Both a and c
Rate this question:
Public void drawRectangle();
Public static int stringToInteger()
Public static calculateGCF()
DrawSquare(int scale);
All of the above
Rate this question:
T1-forward();
T1.backward(-);
T1_forward(100);
T1.backward(-100);
None of the above
Rate this question:
Turtle george = new Turtle();
George = new Turtle();
Turtle george;
Turtle = new Turtle(george);
None of the above
Rate this question:
Public static void drawSquare();
Private static int CalculateLCM()
Public void calculateNumberOfFactors()
Private void drawRectangle();
None of the above
Rate this question:
Public class void SimpleTurtle
Public static int calculateGCF
Protected class Robot;
Private class Calculator
None of the above
Rate this question:
The method header
The class header
The main() method
My_first_method()
None of the above - not enough information is given
Rate this question:
Quiz Review Timeline (Updated): Jan 17, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.