WRITE A PROGRAM TO READ DETAILS LIKE NAME, CLASS , AGE OF A STUDENT AND THEN PRINT THE DETAILS FIRSTLY IN SAME LINE AND THEN IN SEPERATE LINES
Answers
Answered by
0
import java.util.*;
public class details
{
public read(int n,clss,age)
{
n=name;
clss=class;
age=age;
}
public void main()
{
Scanner S=new Scanner(System.in);
System .out.print("Enter the name of the student...=");
string name=S.nextLine();
System .out.print("Enter the age of the student...=");
int age=S.nextInt();
System .out.print("Enter the class of the student...=");
int class=S.nextInt();
details S=new details();
read(name,class,age);
}
}
Similar questions