
JAVA QUIZ
Authored by seetha S
Other
Professional Development
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a correct syntax to output "Hello World" in Java?
System.out.println("Hello World");
print ("Hello World");
echo("Hello World");
Console.WriteLine("Hello World");
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Java is short for "JavaScript".
False
true
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you insert COMMENTS in Java code?
// This is a comment
/* This is a comment
# This is a comment
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which data type is used to create a variable that should store text?
String
Txt
myString
string
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method can be used to find the length of a string?
len()
getLength()
getSize()
length()
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method can be used to return a string in upper case letters?
toUpperCase()
tuc()
upperCase()
touppercase()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to create an object called myObj of MyClass?
new myObj = MyClass();
class myObj = new MyClass();
class MyClass = new myObj();
MyClass myObj = new MyClass();
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?