Exam 3: Introduction to Objects and Inputoutput

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Which package is automatically imported by the Java system?

(Multiple Choice)
5.0/5
(46)

In a format specifier, if the flag is set to 'l', then the output of the result is left justified.

(True/False)
4.7/5
(35)

Which of the following is a valid statement? (i) int num = new int(67); (ii) String name = new ("Doe"); (iii) String name = "Doe";

(Multiple Choice)
4.9/5
(38)

Given int num; the value of num is directly stored in its memory space.

(True/False)
4.9/5
(34)

Suppose that name is a String variable. Then the following two statements are equivalent. name = "Danny"; name = new String("Danny");

(True/False)
4.7/5
(33)

What happens when JOptionPane.PLAIN_MESSAGE is chosen as the messageType parameter?

(Multiple Choice)
4.7/5
(42)

Suppose str is a String variable. The statement str = new String("Programming"); is similar to which of the following?

(Multiple Choice)
4.9/5
(30)

When writing output to a file, if the file is not closed at the end of the program, you may not be able to view your output properly.

(True/False)
4.8/5
(44)

Based on the code above, what is the value of str4?

(Multiple Choice)
4.8/5
(42)

What will most probably happen if you omit the dot operator when accessing a method?

(Multiple Choice)
4.8/5
(33)

Which of the following method is contained in the package java.util?

(Multiple Choice)
4.9/5
(40)

The showMessageDialog method has ____ parameter(s).

(Multiple Choice)
4.9/5
(41)

Reference type variables directly store data into their memory space.

(True/False)
4.9/5
(44)

Consider the following statements. double x; String y; y = String.format("%.2f", x); If x = 285.679, what is the value of y?

(Multiple Choice)
4.8/5
(40)

There are ____ type(s) of methods in a class.

(Multiple Choice)
4.8/5
(39)

Java provides automatic garbage collection.

(True/False)
4.9/5
(31)

The statement System.exit(0); is found at the end of every working Java program.

(True/False)
4.7/5
(34)

Based on the code above, what is the value of str2?

(Multiple Choice)
4.9/5
(35)

The new operator is used to create an int variable.

(True/False)
4.8/5
(39)

Which of the following is an area of secondary storage used to hold information?

(Multiple Choice)
4.8/5
(37)
Showing 21 - 40 of 50
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)