Home > Pharmacology Basics > Quizzes > Java Basics Practice Test: java.util - More Utility Classes
Java Basics Practice Test: java.util - More Utility Classes
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 0% Most missed: “Which of these class produce objects with respect to geographical locations?”

Quiz on more utility classes including locale, random number and classes, timer class, formatter, internationalization, i18n with date, number, currency and time.
 

Related Test: Java Basics Practice Test: java.util &The Collections Framework

Java Basics Practice Test: java.util - More Utility Classes
Time left 00:00
25 Questions

1. Which of these is a method can generate a boolean output?
2. Which of these methods is used to notify observer the change in observed object?
3. Which of these classes can schedule task for execution in future?
4. Random is a final class?
5. What will be the output of the following Java program?
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI") ;
System.out.print(obj.getDisplayLanguage());
}
}
6. Which of these class can generate pseudorandom numbers?
7. What is the signature of Math.random() method?
8. What will be the output of the following Java program?
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI", "INDIA") ;
System.out.print(obj.getDisplayLanguage());
}
}
9. What is the use of Observable class?
10. Which of these interfaces is implemented by TimerTask class?
11. What will be the output of the following Java code snippet?
int a = random.nextInt(7) + 4;
12. Which class is used to generate random number?
13. Which of these interfaces is implemented by TimerTask class?
14. Which of these package provides the ability to read and write in Zip format?
15. Which of these methods calls update() method?
16. Which of these class can generate pseudorandom numbers?
17. What will be the output of the following Java code snippet?
int a = random.nextInt(15) + 1;
18. Which method is used to generate boolean random values in java?
19. What will be the output of the following Java program?
import java.util.*;
class LOCALE_CLASS
{
public static void main(String args[])
{
Locale obj = new Locale("HINDI", "INDIA") ;
System.out.print(obj.getCountry());
}
}
20. Which of these classes can schedule task for execution in future?
21. How many bits are used for generating random numbers?
22. Which of these methods is not a Locale class?
23. What is the range of numbers returned by Math.random() method?
24. What is the return type of Math.random() method?
25. Which class is used to generate random number?