Question 11
Not yet answered
Marked out of 1.00
Flag question
Question text
A subclass will _____ from its superclasses.
Select one:
a. extend
b. implement
c. inherit
d. overload
e. override
Clear my choice
Question 12
Not yet answered
Marked out of 1.00
Flag question
Question text
Question Text: Consider the following line of Java code. "println" is which of the following?
System.out.println("Hello, World!");
Select one:
a. a class
b. a method
c. an object
d. an operator
e. a parameter
Clear my choice
This study source was downloaded by 100000848649392 from CourseHero.com on 08-15-2022 04:47:06 GMT -05:00
https://www.coursehero.com/file/64926299/CS-1102-Final-exam-part-2docx/
, Question 13
Not yet answered
Marked out of 1.00
Flag question
Question text
What is the output of the following Java program?
class Food {
void flavor() { System.out.println("bland"); }
}
class Pepper extends Food {
void flavor() { System.out.println("spicy"); }
}
public class Lunch {
public static void main(String[] args) {
Food lunch = new Pepper();
lunch.flavor();
}
}
Select one:
a. bland
b. bland
spicy
c. (no output)
d. spicy
e. spicy
bland
Clear my choice
Question 14
Not yet answered
Marked out of 1.00
Flag question
Question text
This study source was downloaded by 100000848649392 from CourseHero.com on 08-15-2022 04:47:06 GMT -05:00
https://www.coursehero.com/file/64926299/CS-1102-Final-exam-part-2docx/