What invokes a scheduled Timer?

What invokes a scheduled Timer?  a. AbstractTask b. ScheduledTask c. Task d. TimerTask Answer: d. TimerTas...

What happens when the code that follows is executed?

What happens when the code that follows is executed? int[] nums = new int[4]; for (int i = 0; i <= nums.length; i++) { nums[i] = i; } System.out.println(nums[2]); a....

What is the length of the bestTimes array?

double[] times = {3.56, 3.9, 2.6, 4.5, 2.4, 5.2}; double[] bestTimes = new double[4]; Arrays.sort(times); bestTimes = Arrays.copyOfRange(times, 1, 4); What...

An enhanced for loop can only be used

An enhanced for loop can only be used a. to work with one-dimensional arrays b. to work with all the elements of an array c. to work with jagged arrays d....

To include a class in a package, you

To include a class in a package, you a. code an import statement as the first statement of the class b. code a package statement as the first statement...

A subclass inherits

A subclass inherits a. protected data only b. public, private, and protected data c. public and private data d. public and protected data Answer: d....

A class in the Java API

A class in the Java API a. can be both a superclass and a subclass b. can be inherited only by other classes in the Java API c. can have only one subclass d....

A static initialization block

A static initialization block a. is used to initialize a static variable that can't be initialized in the declaration b. is executed when a static...

The goal of testing is to

The goal of testing is to a. make sure the application works with invalid data b. fix all errors in the application c. make sure the application works...

What happens in the method that follows when s is "two"?

What happens in the method that follows when s is "two"? public double parseInterval(String s) { double interval = 0.0; try { interval = Double.parseDouble(s); } catch(NumberFormatException...

What is the order of method calls?

What is the order of method calls? a. FutureValueApp.main calls java.util.Scanner.nextDouble calls java.util.Scanner.next calls java.util.Scanner.throwFor b....

What is this output called?

What is this output called? a. a method log b. a stack trace c. an exception handler d. an exception hierarchy Answer: a stack trace Output...

Consider the code that follows. What does it do?

Consider the code that follows. What does it do? String value = "2"; boolean tryAgain = true; while (tryAgain == true) { try { int num = Integer.parseInt(value); tryAgain...

When is the code within a catch block executed?

When is the code within a catch block executed? a. When the exception specified in the catch block is thrown in the try block b. When a runtime error...

In Java, exceptions are

In Java, exceptions are a. statements b. classes c. compile-time errors d. objects Answer: object...

What is the order of method calls?

Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:818) at java.util.Scanner.next(Scanner.java:1420) at...

What caused the exception to occur?

Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor(Scanner.java:818) at java.util.Scanner.next(Scanner.java:1420) at...

The has methods of the Scanner class let you

The has methods of the Scanner class let you a. check if the user has entered data at the console b. check if the data entered at the console can be...

What does the abbreviation SQL stand for?

What does the abbreviation SQL stand for? a. Structured Quorum List b. Simple Quorum Language c. Simple Query List d. Structured Query Language Answer: d....

Which browser is not supported in Android?

Which browser is not supported in Android? a. Internet Explorer b. Firefox c. Dolphin d. Opera Answer: a. Internet Explore...

Where is the strings.xml file located?

Where is the strings.xml file located? a. res/drawable-mdpi folder b. res/layout folder c. res/values folder d. res/drawable-hdpi folder Answer: c....

What is the generic layout to a simple list?

What is the generic layout to a simple list? a. simple_list_item_multiple_choice b. simple_list_item_2 c. simple_list_item_1 d. simple_list_item_checked Answer: c....

What does the acronym URL stand for?

What does the acronym URL stand for? a. Uniform Resource Locator b. Usual Random Lesson c. Universal Redirection Locale d. Utility Rendering Logo Answer: a....