In the Below code why the String c = input.nextLine()
is not working here?I am trying this on Eclipse IDE.
import java.util.Scanner;
public class DataTypes {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int i = 4;
double d = 4.0;
String s = "Hackerrank";
int a = input.nextInt();
double b = input.nextDouble();
String c = input.nextLine();
System.out.println(i+a);
System.out.println(b+d);
System.out.println(s+" "+c);
}
}