Answers for "take string , double and int value from useer using java"

0

take string , double and int value from useer using java

import java.util.Scanner;

public class Solution {

public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int i = scan.nextInt();
    double d = scan.nextDouble();

    scan.nextLine();
    String s = scan.nextLine();

    System.out.println("String: " + s);
    System.out.println("Double: " + d);
    System.out.println("Int: " + i);
}
Posted by: Guest on October-01-2021

Code answers related to "take string , double and int value from useer using java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language