+ 1
How to do linear search to find student mark in java coding?
2 Respuestas
+ 6
This is a basic search algorithm for any programming language. I checked your profile and you just started java. I suggest you finish the java course first to get a feel of its concepts.
https://www.sololearn.com/learn/766/?ref=app
0
The better is to have a collection and operate over it. example:
Optional<Student> findStudent(Collection<Student> col, String id){
return col.stream()
.filter(student -> student.getId().equals(id))
.findFirst();
}