Question: my code has a semantic error I expect to receive this output: But my output is My java code is: import java.util.Scanner; public class Anagram{

my code has a semantic error I expect to receive this output:

my code has a semantic error I expect to receive this output:

But my output is

But my output is My java code is: import java.util.Scanner; public class

My java code is:

import java.util.Scanner; public class Anagram{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); System.out.print("Enter first phrase"); String phrase_1 = scan.nextLine(); Scanner scan2 = new Scanner(System.in); System.out.println("Enter second phrase"); String phrase_2 = scan.nextLine(); phrase_2 = phrase_2.toLowerCase(); String new_phrase_1 = ""; String new_phrase_2 = ""; for(char chr = 'a';chr

Typical expected output: Enter first phrase replays Enter second phrase parsley aelprsy are the letters of replays in order aelprsy are the letters of parsley in order replays is an anagram of parsley Enter furst phrase replays Enter second phrase parsley aelprsy are the letters of replays in order aelprsy are the letters of parsley in order

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!