0
What's the problem?
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner s = new Scanner(System.in); try{ String x = s.nextLine(); String y = s.nextLine(); System.out.println (x); System.out.println (x.charAt (0)); } catch (Exception e){ System.out.println ("something went wrong"); } } }
4 Respostas