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
Get step-by-step solutions from verified subject matter experts
