import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Tech[] std=new Tech[5];
int i;
for(i=0;i<5;i++)
{
System.out.println("Enter Name of Student");
String Name;
Scanner scanIn = new Scanner(System.in);
Name = scanIn.nextLine();
scanIn.close();
std[i].setName(Name);
System.out.println(std[i].name);
}
}
}
线程中的异常&#34; main&#34; java.lang.NullPointerException at Main.main(Main.java:16)