Hi, so I have to write a program for my Java assignment and I am just starting out so I might be doing this wrong but I can't figure out why it won't invoke the method I have created.
import java.util.Scanner;
public class EvalMarks1 {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
int i;
String endProgram = "NONE";
String [] student = new String [10];
do {
System.out.println ("Please enter name of 10 students:");
for (i = 0; i < 10; i++)
{
System.out.print ("Student " + (i+1) + ": ");
student [i] = input.nextLine();
}
student.print ();
}while (true);
}
public void print (String [] student)
{
int i;
for (i = 0; i < 10; i++)
{
System.out.print (student [i] + "\n");
}
}
}
This isn't the full program yet, but I can't proceed without invoking the method and I know this can be done without creating a method but it is required to do so in my assignment. Any help would be great, thank you