OOP mentore week 9

Welcome!
1 / 16
volgende
Slide 1: Tekstslide
NatuurkundeMiddelbare school

In deze les zitten 16 slides, met interactieve quizzen en tekstslide.

Onderdelen in deze les

Welcome!

Slide 1 - Tekstslide

Static binding happens at runtime
A
True
B
False

Slide 2 - Quizvraag

Java allows multiple inherintance
A
True
B
False

Slide 3 - Quizvraag

Using Optional<> avoid all NullPointerExceptions
A
True
B
False

Slide 4 - Quizvraag

You can add a char to a ArrayList<Characters>
(without getting exceptions)
A
True
B
False

Slide 5 - Quizvraag

Writing good tests guarantees a program will not crash
A
True
B
False

Slide 6 - Quizvraag

Which interpretation of the keyword abstract is false?
A
Making a class abstract means that all of its methods should be abstract
B
Making a class abstract means that it cannot be instantiated
C
A concrete subclass must implement abstract methods in its parent

Slide 7 - Quizvraag

Which is not a valid way to start a new thread?
A
Extend the class Thread and call .start() on an instance of this class
B
Create a Thread with a lambda as argument and call .start()
C
Implement the interface Runnable and call .run()

Slide 8 - Quizvraag

Which of the following cannot be caught in a catch block?
A
StackOverflowError
B
IOException
C
ArrayIndexOutOf BoundsException

Slide 9 - Quizvraag

When attempting to cast between incompatible types...
A
The program will not compile
B
The program will raise an exception on runtime
C
The incompatible fields will be filled with null

Slide 10 - Quizvraag

Which statement about BufferedReader and Scanner is false?
A
Scanner can be used to read from an InputStream
B
A BufferedReader is a reader that takes a reader as an argument
C
BufferedReader can only read a single character at a time

Slide 11 - Quizvraag

Which is true?
A
This method does not compile
B
This method will raise an ArrayIndexOutOf BoundsExcpetion
C
This method will raise a NullPointException
D
This method will work without problema

Slide 12 - Quizvraag


A
CoffeeMachine extends Machine and Grinder extends CoffeeMachine
B
CoffeeMachine extends Machine and CoffeeMachine implements Ginder as interface
C
CoffeMachine extends Machine and Grinder is attribute of CoffeMachine by use of composition
D
CoffeeMachine extends Machine but not relation between CoffeeMachine and Grinder (they don't share properties)

Slide 13 - Quizvraag

Which is
true?
A
The test does not compile
B
The test passes
C
The test fails
D
The test leads to a runtime exception

Slide 14 - Quizvraag

What is
the outcome?
A
The program does not compile
B
18
C
36
D
54

Slide 15 - Quizvraag

Which
is true?
A
The program does not compile
B
A runtime exception occurs
C
"A pair of animals" is printed
D
"A pair of coatis" is printed

Slide 16 - Quizvraag