print the input for Integer, Double and String

print the input for Integer, Double and String 


---------------------------------------------------------------------------------------------------------------------

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();


        // Write your code here.

        System.out.println("String: "+ s);

        System.out.println("Double: "+d);

        System.out.println("Int: "+i);

    }

}


Comments

Popular posts from this blog

download youtube videos java program ( AI generated)

Spring boot versions : Detailed explanation of the different versions and releases of Spring Boot (AI Generated)

Java Spring Framework versions and their major releases ( AI Generated )