Exam 6: Methods: a Deeper Look

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

Suppose method1 is declared as void method1 ( int a,float b ) Which of the following methods correctly overloads method1?

Free
(Multiple Choice)
4.7/5
(52)
Correct Answer:
Verified

C

Overloaded methods always have the same _________.

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

A

If more method calls occur than can have their activation records stored on the program execution stack,an error known as a ________ occurs.

Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
Verified

A

A Java class can have which of the following methods? a)void foo( int a ) b)void foo( int a,int b ) c)void foo( double a ) d)void foo( double a,double b ) e)void foo( int b )

(Multiple Choice)
4.9/5
(40)

Which statement is not true.

(Multiple Choice)
4.8/5
(35)

Method calls cannot be distinguished by ________.

(Multiple Choice)
4.8/5
(36)

An enumeration is a special class that's introduced by the keyword ________ and a type name.

(Multiple Choice)
5.0/5
(41)

Variables should be declared as fields only if

(Multiple Choice)
4.9/5
(43)

The identifiers in an enumeration ________.

(Multiple Choice)
4.9/5
(36)

The java.text package contains classes for manipulating all of the following items except

(Multiple Choice)
5.0/5
(45)

Which statement below could be used to simulate the outputs of rolling a six-sided die? Suppose randomNumbers is a Random object.

(Multiple Choice)
4.9/5
(32)

Java uses class ________ to represent colors using their RGB values.

(Multiple Choice)
4.8/5
(36)

Which of the following is not a package in the Java API?

(Multiple Choice)
4.9/5
(40)

Which of the following promotions of primitive types is not allowed to occur?

(Multiple Choice)
4.8/5
(35)

Information is passed to a method in:

(Multiple Choice)
4.9/5
(31)

A well-designed method

(Multiple Choice)
4.7/5
(32)

Math static method random generates a random double value in the range from 0.0

(Multiple Choice)
4.9/5
(34)

Filled rectangles and filled circles are drawn using Graphics method ________ and ________.

(Multiple Choice)
5.0/5
(37)

Which operator can be used in string concatenation?

(Multiple Choice)
4.7/5
(42)

Declaring main as ________ allows the JVM to invoke main without creating an instance of the class.

(Multiple Choice)
4.9/5
(39)
Showing 1 - 20 of 42
close modal

Filters

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