QUESTION 50 Java can display .gif and .jpg image files. True False 1 points QUES
ID: 3582437 • Letter: Q
Question
QUESTION 50
Java can display .gif and .jpg image files.
True
False
1 points
QUESTION 51
A frame is a(n) __________.
window not contained within another window
a container
a component
all of the above
2 points
QUESTION 52
When ? is used with generics, which of the following is not true?
It represents an unknown type
It may be the type of a local variable
It may be the a type of a return type
It may be used as a subtype
2 points
QUESTION 53
Using ? super T __________.
is unbounded
is upper bounded
is lower bounded
does not compile
2 points
QUESTION 54
An abstract class can be used as a data type, but you cannot create an instance of the class using the new operator.
True
False
1 points
QUESTION 55
With JavaFX, the start() method normally places user interface controls in a Scene and then displays the Scene in a Stage.
True
False
1 points
QUESTION 56
An interface with an empty body is called a marker interface.
True
False
1 points
QUESTION 57
Use of a raw type is unsafe.
True
False
1 points
QUESTION 58
Which of these JavaFX panes function in a similar fashion to analogous layout managers in Swing.
BorderPane
FlowPane
GridPane
all of the above
2 points
QUESTION 59
A concrete type is what the compiler uses to replace the generic type at compile time.
True
False
a.window not contained within another window
b.a container
c.a component
d.all of the above
Explanation / Answer
50)
Ans) True
Explanation :- We can display .jpg and .gif files in java swings
51)
Ans) All the above
Explanation :- JFrame class is in a hierarchy whose superclasses include (going upward) Frame, Window, Container, Component. Which means that a frame is a part of Component , Container.
52)
Ans) a
Explanation :- When we use generics , we don't need to explicitly cast the value from the list and it will provide us compile time type safety.
As per the options , it can be local variables type, it can be type of return type or it can be type of a subtype also. We should specify specific type if it is unknown type then it won't work.
53)
Ans) c
Explanation :- When we use 'extends B' then B is upper bound and if we use 'Super B' then B is lower bound.
54)
Ans) True
Explanation :- We can not create instance of an abstract class using new keyword but we can use it as a datatype by using a subclass to it.
Suppose I have an abstract class named A and I extended it with a subclass named B then we can say that
A obj = new B(); This statement will work perfectly and it is called upcasting.
Java permits an object of a subclass type to be treated as an object of any superclass type. This is called upcasting.
55)
Ans) True
Explanation :- The start() method normally places user interface controls in a Scene and then displays the Scene in a Stage.
56)
Ans) True
Explanation :- Marker interface in Java is the interface which does not contain any fields or methods.
57)
Ans) True
Explanation :- Use of raw type is safe
58)
Ans) d
Explanation :- all the above
59)
Ans) False
Explanation :- The opposite of the abstract class is the concrete class which means it provides the implementations. It is not the type that complier uses to replace the generic type at compile time.