Computer Science, asked by chandhrakumar494, 3 months ago

write a Java program to read the following data from the user using scanner class and display the input data. •string name;
• int age;
•double salary;
•string address;
• in mobile No;​

Answers

Answered by mk9999
1

Explanation:

public class Display

{

public static void main(Sting args[])

{ int n,a,s,add,mob

Scanner sc=new scanner(System.in)

System.out.println("Your name is: "+n)

int n=sc.nextInt()

Scanner sc=new scanner(System.in)

System.out.println("Your age is: "+a)

int a=sc.nextInt()

Scanner sc=new scanner(System.in)

System.out.println("Your salary is: "+s)

int s=sc.nextInt()

Scanner sc=new scanner(System.in)

System.out.println("Your addres is: "+add)

int add=sc.nextInt()

Scanner sc=new scanner(System.in)

System.out.println("Your mobile no.is: "+mob)

int mob=sc.nextInt()

}

}

Similar questions