Indicate if the following lines of codes are legal or illegal. If legal select the resulting value. If illegal select Error.
String hello = new String("Hello world!");
int len = hello.length();
Java OOP principles Summative test
Quiz
•
Other
•
University
•
Hard
Jeffmark Pinaredondo
Used 7+ times
FREE Resource
60 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Indicate if the following lines of codes are legal or illegal. If legal select the resulting value. If illegal select Error.
String hello = new String("Hello world!");
int len = hello.length();
legal
11
illegal
Error
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
interface and implement keywords should be used side by side to run the program with abstraction.
True
False
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
which keyword is used in a program to set the variable or identifier's value fixed?
constant
const
cons
consts
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
When a derived class is defined it also has all the attributes and methods of the base class
Polymorphism
Encapsulation
Inheritance
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The ability of a programming language to process objects differently depending on their class.
Inheritance
Encapsulation
Polymorphism
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
An object's attributes are contained in the object and access to them is restricted to operations of that class
Inheritance
Polymorphism
Encapsulation
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The process of creating an actual named instance of class.
Instantiation
Overrriding
Method
Attribute
62 questions
QCM 1 - SF ADM
Quiz
•
University
60 questions
entrep
Quiz
•
University
60 questions
SE101(reviewer)
Quiz
•
University
59 questions
EE1 Unit 1
Quiz
•
University
57 questions
USI - Part 107 - Mods 1 - 4
Quiz
•
University
55 questions
Mixed Review - Ch 7-8-9
Quiz
•
University - Professi...
60 questions
Test de positionnement Français I
Quiz
•
7th Grade - Professio...
60 questions
Secure Computer Systems - Quizzes
Quiz
•
University
15 questions
Multiplication Facts
Quiz
•
4th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
20 questions
math review
Quiz
•
4th Grade
5 questions
capitalization in sentences
Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance
Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions
Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines
Quiz
•
Professional Development
12 questions
Dividing Fractions
Quiz
•
6th Grade