Match the following with respect to java.util.* class methods :
| (a) Bit Set | (i) Time zone getTimezone( ) |
| (b) Calendar | (ii) int hashcode( ) |
| (c) Time zone | (iii) int nextInt( ) |
| (d) Random | (iv) Void setID(String tzName) |
(a) (b) (c) (d)
UGC NET - 2012,
Answer: A
In java.util the BitSet class has the method int hashCode() (ii), Calendar has a method returning the time zone, getTimeZone() (i), TimeZone has the method void setID(String) (iv), and Random has int nextInt() (iii). So the match is (a)-(ii), (b)-(i), (c)-(iv), (d)-(iii), option (A). Option (B) gives BitSet nextInt, option (C) gives BitSet setID, and option (D) gives TimeZone nextInt and Random setID, so they are wrong.
Please log in or register to report this question.