Java Quiz 2

Quiz
•
Computers
•
University
•
Hard
Faimina B S
Used 2+ times
FREE Resource
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which of the following statements is a valid declaration of an object that belongs to “MyClass”?
MyClass obj = new MyClass();
MyClass obj = new MyClass;
obj = new MyClass();
new MyClass obj;
2.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
How many objects can be made from a class?
None, you make classes from objects
one
As many as you want
All of the above
3.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
The ____ method executes first in an application, regardless of where you physically place it within its class.
execute()
main()
start()
run()
4.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
To create an object in java we use the keyword new.
True
False
5.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
<class name><Object name>=new <class name>();
This is syntax of creating ______.
class
object
method
function
6.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
What does the final keyword do in front of a variable 'x' declaration do?
the "final" keyword means a man is taking his final, so do not disturb him.
the "final" keyword means there is only one attribute in the Main class.
The "final" keyword before the declaration of the variable "x" indicates that it is a constant and cannot be modified after its initial assignment.
the "final" keyword before the declaration of the variable "x" indicates that there is only one method() in this class.
7.
MULTIPLE CHOICE QUESTION
45 sec • 2 pts
Which of the following line of codes calls an attribute x within a class, and prints its value?
System.out.println(x());
System.out.println(x);
System.out.println(obj.x)
System.out.println("x");
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Kuis PBM 222

Quiz
•
University
25 questions
Java Programming Quiz

Quiz
•
University
30 questions
JAVA FUNDAMENTALS

Quiz
•
University
32 questions
C# Skill Review

Quiz
•
12th Grade - Professi...
28 questions
OOPS Live Quiz

Quiz
•
University
30 questions
Computer Programming 2

Quiz
•
University
29 questions
Exception-Interface,Package (29 câu)

Quiz
•
University
25 questions
Neo Coding Round 1 Set 1

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University