My code works great, but one Condition is not checked "If the names are identical, display "The names are identical". Does someone know why?
package com.codegym.task.task04.task0421;
/*
Jen or Jen?
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String n1 = reader.readLine();
String n2 = reader.readLine();
int s1 = n1.length();
int s2 = n2.length();
if(n1.equals(n2)){
System.out.println("The names are identical");
}
if(s1== s2){
System.out.println("The names are the same length");
}
}
}