-1

My code looks like this, and for some reason the last line of scanner.nextLine() doesn't show up. Is there any solution to this type of issue?

 Scanner scanner = new Scanner (System.in);

        String i = scanner.nextLine();
        double j = scanner.nextDouble();
        char c = scanner.next().charAt(0);
        long l = scanner.nextLong();
        int acc = scanner.nextInt();
        String abc = scanner.nextLine();  //this one doesn't show up for some reason

        System.out.println("string : " + i);
        System.out.println("double : "+ j);
        System.out.println("char : "+ c);
        System.out.println("long : " + l);
        System.out.println("int : "+ acc);
        System.out.println("string : "+ abc);

        scanner.close();

OLite
  • 1

0 Answers0