Computer Science, asked by ghezta6, 11 months ago

JAVA PROGRAM

create a class that contains the name and telephone number of people. create four objects and also a function that displays the details. the object should be created from the main program and the details of all the four people should be displayed​

Answers

Answered by parthomsarwade
1

import java.util.*;

class p1

{

public static void main()

{

Scanner sc=new Scanner(System.in);

int a;

String Name;

System.out.println("enter a 10 digit number");

a=sc.nextInt();

sc.nextLinr();

System.out.println("Enter a name");

Name=sc.nextLine();

}

}

Similar questions