my method uses System.out.println
Since this is printing, not returning, I declared the method as void
Where is the error coming from? I obviously used a return type
package com.codegym.task.task04.task0421;
/*
Jen or Jen?
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader bbr = new BufferedReader(new InputStreamReader(System.in));
String namea = bbr.readLine();
String nameb = bbr.readLine();
}
void estName(namea, nameb);
public static void estName(String a, String b) {
if (a == b) {
System.out.println("The names are identical");
} else if (a.length() - b.length() == 0) {
System.out.println("The names are the same length");
}
}
}