Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions