The ToString( ) method is automatically invoked when an object reference is made in the ____.

A. class constructor
B. Write( ) method
C. mutator method
D. object class


Answer: B

Computer Science & Information Technology

You might also like to view...

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

1) The protected members of a class may be accessed in their base class or any classes derived from that base class. 2) The first task of any derived-class constructor is to call its base-class constructor. 3) A "copy-and-paste" approach is a simple and efficient way from a software-engineering perspective of providing functionality that exists in other classes. 4) Using protected instance variables can cause derived-class methods to be written to depend on base-class implementation.

Computer Science & Information Technology

Consider the Java segment:

String line1 = new String("c = 1 + 2 + 3") ; StringTokenizer tok = new StringTokenizer(line1, "+="); String foo = tok.nextToken(); String bar = tok.nextToken(); The values of foo and bar are: a. foo is “c ”, bar is “ = ”. b. foo is “c”, bar is “ ”. c. foo is “ = ”, bar is “ + ”. d. foo is “c ”, bar is “ 1 ”.

Computer Science & Information Technology

A(n) ____ created in Microsoft Word or another word-processing program works well as a shell for a PowerPoint presentation.

A. document B. sketch C. table D. outline

Computer Science & Information Technology

What are the basic differences among data dictionary entries prepared for data stores, data structures, and data elements? T

What will be an ideal response?

Computer Science & Information Technology