Object Oriented Programming - I (3140705) MCQs

MCQs of JAVAFX basics and Event-driven programming and animations

Showing 11 to 20 out of 31 Questions
11.
Which is the default argument of start() of Application class in JavaFX?
(a) Node
(b) Stage
(c) Scene
(d) Group
Answer:

Option (b)

12.
Which method is not part of life cycle of JavaFX application?
(a) init()
(b) start()
(c) update()
(d) stop()
Answer:

Option (c)

13.
Width and height arguments are optional in the constructor of Scene class.
(a) TRUE
(b) FALSE
Answer:

Option (a)

14.
Which method is used to add scene to stage?
(a) addScene()
(b) setScene()
(c) showScene()
(d) loadScene()
Answer:

Option (b)

15.
The following is not the method of Line class in javafx.scene.shape
(a) setStartX()
(b) getStartX()
(c) getLength()
(d) toString()
Answer:

Option (c)

16.
Which method is used to make rounded rectangle?
(a) setArcWidth()
(b) setRoundedCorner()
(c) setHeight()
(d) setWidth()
Answer:

Option (a)

17.
Which is the incorrect instantiation of Color class?
(a) Color c = Color.web("0x0000FF",1.0);
(b) Color c = Color.rgb(0,0,255);
(c) Color color = new Color(0.0,0.3,0.2);
(d) Color c = Color.hsb(270,1.0,1.0);
Answer:

Option (c)

18.
Which package is required to load images in JavaFX?
(a) javafx.scene.image
(b) javafx.scene.imageView
(c) javafx.image
(d) javafx.scene.image.imageView
Answer:

Option (a)

19.
The _____ layout arranges all the nodes in our application in a single horizontal row.
(a) VBox
(b) FlowPane
(c) HBox
(d) TilePane
Answer:

Option (c)

20.
The _____ layout arranges all the nodes in our application in a single vertical column.
(a) VBox
(b) FlowPane
(c) HBox
(d) TilePane
Answer:

Option (a)

Showing 11 to 20 out of 31 Questions