Click here to Skip to main content
15,886,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
public class Student4 {
int marks;
int rollno;
int rank;
String name;

void setRecord(int i,int n,int r,String ne){
marks=i;
rollno=n;
rank=r;
name=ne;

}



void display()
{
System.out.println(rollno);
System.out.println(name);
System.out.println(marks);
System.out.println(rank);
System.out.println("");

}
}
class Result{
public static void main(String[] args) {
Student4 d1=new Student4();
Student4 d2=new Student4();
Student4 d3=new Student4();
d1.setRecord(101,45,551,"Edward");
d2.setRecord(101,985,1,"Hard");
d3.setRecord(101,985,1,"Erd");
d1.display();
d2.display();
d3.display();
}

}

What I have tried:

my best but unable to understand
Posted
Updated 23-Sep-17 2:40am

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900