Question: Write a Java code including a method named check() which takes two strings as parameters and returns a boolean value based on whether both strings
Write a Java code including a method named check() which takes two strings as parameters and returns a boolean value based on whether both strings have same character pattern. If both strings have the same length and if two characters in one string are the same only if the characters at the corresponding positions in the other string are also the same, we accept both strings have same pattern. You are not allowed to create extra strings, arrays and use any data structures check for pattern not same character for example if we put aaa and bbb for input, output should be True However if we put aaa and abb for input output should be False Do Not Use Stringbuilder
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
