Show the output of the following Java code for values shown below

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 1DE
icon
Related questions
Question

??. 

 

36
37
24
24
27
28
29
QUESTION 7
Show the output of the following Java code for values shown below.
30
20
21
public static void maint@tring() eran) (
// TODO wede application login here
Ruanner in-new Smanner(System)
Steing at
awitob
1. str = "ABCD"
2. str="ACBD"
3. str="BCDE"
in.next()
(str. oberhs (2)) (
case 'A:
System.out.println("Excellent");
break/
case ''
CASE CE
System.out.print(Well done");
break;
se 'D'
System.out.print("You passed");
break;
case ¹:
System.out.print("Retter try again");
break:
default:
System.out.print("Invalid grade");
Transcribed Image Text:36 37 24 24 27 28 29 QUESTION 7 Show the output of the following Java code for values shown below. 30 20 21 public static void maint@tring() eran) ( // TODO wede application login here Ruanner in-new Smanner(System) Steing at awitob 1. str = "ABCD" 2. str="ACBD" 3. str="BCDE" in.next() (str. oberhs (2)) ( case 'A: System.out.println("Excellent"); break/ case '' CASE CE System.out.print(Well done"); break; se 'D' System.out.print("You passed"); break; case ¹: System.out.print("Retter try again"); break: default: System.out.print("Invalid grade");
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,