Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started