Kuis Oracle Sabitha
Kuis Oracle Sabitha
Start with two slashes and a star (//*). End with a star-slash (*/).
Start with two slashes (//). End when the line ends. (*)
Start with two slashes (//). End with two slashes (//).
Start with a slash- star (/*). End with slash-star (/*).
Start with a slash-star (/*). End with a star-slash (*/). (*)
Correct
(1/1) Points
2. Which of the following are considered Whitespace?
(Choose all correct answers)
Creation of procedures.
Modeling objects. (*)
Writing algorithms.
Object interaction without a prescribed order. (*)
Correct
(1/1) Points
9. An object may interact with another object by invoking methods.
True (*)
False
Correct
(1/1) Points
10. In object oriented programming, an object comprises of properties and
behaviors where properties represented as fields of the object and behavior is
represented as method.
True (*)
False
Correct
11. There are several fields and methods in a Shirt class. Which of the following
could be a method in the Shirt class?
size
price
getShirtSize() (*)
color
Correct
(1/1) Points
12. A software feature may allow the user to perform a specific task.
True (*)
False
Correct
(1/1) Points
13. What is the correct order of steps in the Spiral Model of Development?
Design, Develop , Requirements, Test
Design, Requirements, Develop, Test
Requirements, Design, Test, Develop
Requirements, Design, Develop, Test (*)
Correct
(1/1) Points
14. You’d like to see a movie with a few friends. You write an email to confirm plans.
Hi Friends,
There’s a new movie “Attack of the Duke!” premiering this Friday at Oracle Cinema
at 4:30 PM. The cinema is at the corner of South Street and Walnut Ave. Subway
would be the best way to get there.
long (*)
int (*)
double (*)
boolean
byte
Correct
(1/1) Points
5. What is the correct way to cast a long to an int?
int longToInt = (int)20L; (*)
int longToInt = int 20L;
int longToInt = 20L(int);
int longToInt = 20L;
Correct
6. Which exception occurs because a String cannot be parsed as an int?
NumberFormatException (*)
ArithmeticException
NullPointerException
ValueNotFoundException
Correct
(1/1) Points
7. Automatic promotion from smaller data type to a larger data type is not allowed
in Java.
True
False (*)
Correct
(1/1) Points
8. A double with the value of 20.5 is cast to an int. What is the value of the int?
20 (*)
21
20.5
25
Correct
(1/1) Points
9. Which two statements are true about type casting?
(Choose all correct answers)
Common math functions like square root are taken care of in the language. (*)
Math methods can be invoked with Strings as arguments.
The Math methods can be invoked without creating an instance of a Math
object. (*)
You don’t have to worry about the data type returned from a Math method.
Correct
(1/1) Points
7. All the methods in the Math class are static methods.
True (*)
False
Correct
(1/1) Points
8. A constant field, like Math.PI is used to represent a fixed value.
True (*)
False
Correct
(1/1) Points
9. Which method returns the length of a String?
compareTo()
charAt()
findLength ()
length() (*)
Correct
(1/1) Points
10. What is the output?