Practice 4.2
Practice 4.2
sripurushothaman 192324114
Practice 4.2
Solutions
3)
Soln:
import java.util.regex.*;
import java.io.*;
// Keep reading each line and adding valid answers to the string answers
if (pattern.matcher(line).matches()) {
answers += line;
line = codedAnswers.readLine();
codedAnswers.close();
}
4)
Soln:
.replace('E', 'A')
.replace('f', 'c')
.replace('F', 'D');
return result.toLowerCase();
// Example usage