×
Login Or SignUp
Privacy Policy
Terms Of Service
freetests4u.com
Online Knowledge Sharing Platform
Login/SignUp
freetests4u.com
Blogs
Mock Tests
Videos
Jobs
26 .
Which of the following collection maintain its elements in Natural Sorted order ?
A.
LinkedMap
B.
LinkedHashMap
C.
TreeMap
D.
HashMap
View Answer
Ans: TreeMap
27 .
Which statement is true about a static nested class?
A.
You must have a reference to an instance of the enclosing class in order to instantiate it.
B.
it does not have access to non static members of the enclosing class.
C.
its variables and method must be static
D.
it must extend the enclosing class
View Answer
Ans: it does not have access to non static members of the enclosing class.
28 .
Which of these is method for testing whether the specified element is a file or a directory?
A.
IsFile()
B.
isFile()
C.
Isfile()
D.
isfile()
View Answer
Ans: isFile()
29 .
Which of the following allows us to call generic methods as a normal method?
A.
Type Interface
B.
Interface
C.
Inner class
D.
All of the mentioned
View Answer
Ans: Type Interface
30 .
If we add Enum constants to a sorted collection ( Treemap , TreeSet ), What will be the order in which they will be maintained ?
A.
Sorted Collection wont maintain them in any order.
B.
Insertion Order
C.
Order in which constants are declared.
D.
Natural Sorting Order.
View Answer
Ans: Order in which constants are declared.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17