Question: 1. Consider the following code: Scanner sc = new Scanner (System.in); System.out.println(Do you think exams are fun?); Strings = sc.nextLine(); if(s.equals (yes)) { System.out.print (Really?);

 1. Consider the following code: Scanner sc = new Scanner (System.in);

1. Consider the following code: Scanner sc = new Scanner (System.in); System.out.println("Do you think exams are fun?"); Strings = sc.nextLine(); if(s.equals ("yes")) { System.out.print ("Really?"); } else if(s.equals("no")) { String s2 = new String ("me neither"); System.out.print (s2); } How many Classes, Objects, Methods does the code contain? 7

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