Answer the following statements true (T) or false (F)

1) All of the classes contained in the java.util package are automatically included in every Java program.
2) When called with integer parameter n, the nextInt() method of the Random class will return a randomly generated
integer between 0 and n.
3) The Math class is part of the java.lang package.
4) Enumerated types allow a programmer to treat primitive data as objects.
5) The System.out.printf() method is an alternative way to output information in Java.


1) F
2) F
3) T
4) F
5) T

Computer Science & Information Technology

You might also like to view...

Is << used for input or output? ____________

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Consider a class that uses the following variables to implement an array-based stack:

``` String [] s = new String[100]; int top = 0; ``` a method that implements the String peek() operation can be written as A) return s[top]; B) if (top == 0) throw new RuntimeException("Underflow"); else return s[top]; C) if (top == 0) throw new RuntimeException("Underflow"); else return s[top-1]; D) return s[top-1];

Computer Science & Information Technology

What are the four mainstream versions of Windows 10?

What will be an ideal response?

Computer Science & Information Technology

A class that has at least one abstract method is called an:

(a) concrete class (b) encapsulated class (c) abstract class (d) private class

Computer Science & Information Technology