I have a class "Student".That stores the information of students name age mark etc. I'm using it in arraylist. Here I want to know the position of specific student. Is there any methods to find it or I have to use "for" .please help me?
Class student{
String name;
Int age;
Int mark1;
Int mark2;
Public class student(String name,Int age, Int mark1, Int mark2){
this.name=name;
...
...
}
}
In the main function {
Arraylist<student> ar=new Arraylist<student>();
//Added some students detail using add method //
Then I have to find a position of the student using his name.