Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
But my output is
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started