I know this doesnt work but how can I know if the user added even one char?
public class Program
import java.util.Scanner;
{
public static void main(String[] args) {
    Scanner a = new Scanner(System.in);
    String b = a.nextLine();
//I know this doesnt work but how can I know if the user added even one char?
    if (b!=null){
    System.out.println(b);
}
}
}
 
    