
Classes - Static and Instance
Authored by Jesse Victoroff
Computers
10th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
16 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Math.random() is an example of a static method
True
False
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is true about this code running in a client program?
This code will not compile no matter what
This code will compile no matter what
This code will only compile if printIdNum is an instance method
This code will only compile if printIdNum is a static method
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between "static" and "instance"?
Static items belong to the object, instance items belong to the class
Static items belong to the class, instance items belong to the object
Static refers to variables, instance refers to methods
Static refers to methods, instance refers to variables
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is TRUE about instance variables
They can be accessed from within a class without an accessor method
They can be accessed from outside a class without an accessor method
You must both declare and instantiate them before your constructor
They must be public
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is NOT true about default constructors
Java will create a default Constructor if you forget to write one
A default constructor cannot use negative numbers
A default constructor cannot have parameters
A default constructor cannot have a return type
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the "new" keyword do?
Create a new spot in memory for a class data type
Create a new spot in memory for a primitive data type
Declare a new variable
Initialize a new variable
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does a constructor do?
Create a new spot in memory for a class data type
Declare instance variables
Initialize the values of the instance variables
Create a new class
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?
Similar Resources on Wayground
15 questions
App Inventor
Quiz
•
10th Grade
16 questions
Computer Hardware--Outside
Quiz
•
9th - 12th Grade
20 questions
UAS Administrasi Infrastruktur Jaringan - Routing Dinamis
Quiz
•
11th Grade
15 questions
Desktop Publishing 1
Quiz
•
9th - 10th Grade
14 questions
IPs subnets, DCHP and DNS
Quiz
•
12th Grade
15 questions
JAVA GUI
Quiz
•
11th - 12th Grade
19 questions
EMPOWERMENT TECHNOLOGY 11
Quiz
•
11th Grade
20 questions
Technology 9th Grade
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade