Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone help me fix my code? public class MovieSelectionType { public static void main(String args[]) { MovieService m = new MovieService(); class MovieService{ m.getDVD
Can someone help me fix my code?
public class MovieSelectionType {
public static void main(String args[]) {
MovieService m = new MovieService();
class MovieService{ m.getDVD ();
m.getStreaming(); m.netflix = false;
}
getStreaming ();
if (m.netflix == true); {
m.getStreaming(); }
void getStreaming(); { System.out.println("You have selected Streaming");
}
void getDVD(); { System.out.println ("You have selected DVD"); }
}
}
Expected output should be:
You have selected DVD
You have selected Streaming
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