import [Link].
Scanner;
public class StudentSearch {
public static void main(String[] args) {
// Create a scanner object for input
Scanner scanner = new Scanner([Link]);
// Arrays to store the names and marks of students
String[] students = new String[10];
int[] marks = new int[10];
// Input names and marks of 10 students
for (int i = 0; i < 10; i++) {
[Link]("Enter the name of student " + (i + 1) + ": ");
students[i] = [Link]();
[Link]("Enter the marks of " + students[i] + ": ");
marks[i] = [Link]();
[Link](); // Consume the newline character
}
// Input the name of the student to search for
[Link]("Enter the name of the student to search for: ");
String searchName = [Link]();
// Linear search for the name
boolean found = false;
int position = -1;
for (int i = 0; i < [Link]; i++) {
if (students[i].equalsIgnoreCase(searchName)) {
found = true;
position = i;
break;
}
}
// Display search result
if (found) {
[Link]("Search Successful");
[Link]("The student " + searchName + " is at position " + (position + 1) + " in the
array.");
} else {
[Link]("Search Unsuccessful");
}
// Close the scanner
[Link]();
}
}