Question: Someone creates a class named Planet as follows: 1 : public class Planet 2 : { 3 : private int radius; 4 : 5 :

Someone creates a class named Planet as follows:
1: public class Planet
2: {
3: private int radius;
4:
5: public Planet()
6: {
7: radius =440000;
8: }
9:
10: public Planet( int r )
11: {
12: radius = r;
13: }
14: }
The client code issues the following code:
Planet x;
x = new Planet();
Which of the following statement is false?
The client code's statements will create a Planet object with a radius of 440000 miles.
The client code's statements will call the "default constructor" within the Planet class.
The lines 10 through 13 will NOT run, as a result of the client code's statements.
None of the above is false.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!