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