+ 3

What’s wrong

What is my mistake here public class Program { public static void main(String[] args) { System.out.println("i="); System.in =newScanner(System.in); System.out.println("ie="); double y = in.nextDouble(); double z = in.nextDouble(); } }

8th Nov 2018, 7:59 AM
Jothika
Jothika - avatar
2 Antworten
+ 14
import java.util.Scanner; public class Program{ public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter double: "); double y = input.nextDouble(); System.out.println("Double entered = " + y); double z= input.nextDouble(); System.out.println("Double entered = " + z); } } Are you trying this
8th Nov 2018, 8:24 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 4
Yes!GAWEN STEASY thankyou
8th Nov 2018, 8:36 AM
Jothika
Jothika - avatar