Question: The Movie class includes a toString method. Suppose another class is using the Movie class and has declared m as a Movie and initialized m

The Movie class includes atoStringmethod. Suppose another class is using the Movie class and has declaredmas a Movie and initializedm. Which TWO of the following would use thetoStringmethod correctly to print out information about the moviem?

1.) System.out.println(m.toString);

2.)System.out.println(toString());

3.)System.out.println(m);

4.)System.out.println(m.toString());

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 Programming Questions!