In order to create a simple student profile in any programming language, you have to make use of variable to store the student name, roll_num , Std , etc. for that you must be clear with what data type you want to use to store the information of student.
So according to my information you must create a class which have two method, one is for taking input for the data and the another is for displaying the data.
Code:
class Abc
{
public void accept()
{
// Your Statements
}
public void display()
{
// Your Statement;
}
}
class Xyz
{
public static void main(String str[])
{
Abc a= new Abc();
a.accept();
a.display();
}
}
Bookmarks