What is the default definition of the method toString?
A. There is no default definition; you must define the method yourself.
B. It creates a string that is the name of the object's class, followed by the hash code of the object.
C. It creates a string that is the name of the program.
D. It creates a string that is the name of the package, followed by the name of the class, followed by the hash of the object.
Answer: B
You might also like to view...
When programming, words that have a particular meaning or purpose are called ________
A) keywords B) control structures C) strings D) define codes
Given the following declaration: int j;int sum;double sale[10][7]; which of the following correctly finds the sum of the elements of the fourth column of sale?
A. sum = 0; for(j = 0; j < 7; j++) sum = sum + sale[j][3]; B. sum = 0; for(j = 0; j < 7; j++) sum = sum + sale[j][4]; C. sum = 0; for(j = 0; j < 10; j++) sum = sum + sale[j][4]; D. sum = 0; for(j = 0; j < 10; j++) sum = sum + sale[j][3];