CBSE BOARD X, asked by kumarpankaj766498, 1 year ago

write a java script code to input your name ,residential address, and telephone number and display them or separate line​

Answers

Answered by vigneshilangovan90
2

Answer:

import java.util.Scanner;

public class details

{

    public static void main()

    {

        Scanner sc  = new Scanner(System.in);

        System.out.println("Enter your name: ");

        String name=sc.next();

        System.out.println("Enter your residential address: ");

        String add=sc.nextLine();

        System.out.println("Enter your telephone number: ");

        long num=sc.Long();

        System.out.println(name);

        System.out.println(add);

        System.out.println(num);

     }

}

Explanation:

Similar questions