take string 2c double and int value from useer using java

Solutions on MaxInterview for take string 2c double and int value from useer using java by the best coders in the world

showing results for - "take string 2c double and int value from useer using java"
Mimi
17 May 2020
1import java.util.Scanner;
2
3public class Solution {
4
5public static void main(String[] args) {
6    Scanner scan = new Scanner(System.in);
7    int i = scan.nextInt();
8    double d = scan.nextDouble();
9
10    scan.nextLine();
11    String s = scan.nextLine();
12
13    System.out.println("String: " + s);
14    System.out.println("Double: " + d);
15    System.out.println("Int: " + i);
16}
17
similar questions