stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Fontys Venlo - Programming Concepts - week 13 Flashcards | StudBud
Explore
/
Fontys Venlo - Programming Concepts - week 13
Fontys Venlo - Programming Concepts - week 13
10 terms
·
StudBud Administration
·
67 plays
#fontys #fhtenl #prc1 #java #week13
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
In JavaFX, how to let a
button
react on a mouse
click
?
By calling the button.click() method
Buttons handle clicks automatically.
By binding the click property: button.property(new Handler);
By providing an EventHandler<ActionEvent> object.
2
Which statement about
interfaces
is
RIGHT
?
They can have field variables.
They can have default method implementations.
They can be instantiated.
They cannot extend other interfaces
3
Which of the following can you
instantiate
with
new
?
All answers are correct
Interfaces
Abstract class
Concrete classes
4
Regarding
Property Bindings
, what is the output of the following code (
see picture
)
3 3
3 4
4 5
2 3
5
Have a look at the following code (picture),
why
is the code
not correct
?
getFirstname() method mustnot be abstract
Private fields variables are not allowed
getLastname() method must be abstract.
Methods must have an implementation.
6
Regarding JavaFX
stage, scene and pane
, which relationsship is
correct
? (
→ means HAS A
)
scene → stage → pane
stage → pane → scene
stage → scene → pane
pane → stage → scene
7
Which statement about
abstract classes
is
RIGHT
They can have field variables.
Cannot be used to define common behaviour.
They can be instantiated.
They cannot extend other abstract classes.
8
Have a look at the following code (picture),
why
is the code
not correct
?
Field "name" is not allowed when you have abstract methods.
Abstract methods are only allowed in interfaces.
Abstract methods are not allowed in non-abstract-classes.
Fields and abstract methods must be used in interfaces.
9
Which property definition is
NOT
correct?
IntegerProperty num3 = new Integer(4);
DoubleProperty dbl1 = new SimpleDoubleProperty(10.1);
IntegerProperty num1 = new SimpleIntegerProperty(1);
StringProperty str1 = new SimpleStringProperty("Test");
10
In JavaFX what is a
stage
?
A container for digital actor objects only.
The same as a pane.
A window
A video player