不忙的帮看看谢谢,这个地方执行不过去划线的.(部分代码)
import java.util.*;public class Main {
public static void main(String[] args) {
System.out.println("请输入选修课程总数");
int k=t.CourseNum();
k=in.nextInt();
for(int i=0;i<k;i++)
{
System.out.println("请输入选修课程名称");
Name=in.next();
System.out.println("请输入选修课程学分");
Mark=in.nextInt();
tp[i]=new Course(Name,Mark);
}
Student.setCourse(tp);
public class Student {
public static void setCourse( Course[] topic)
{
for(int i=0;i<topic.length;i++)
{
list[i].CourseName=topic[i].CourseName;
list[i].CourseMark=topic[i].CourseMark;
}
}
public class Course {
String CourseName;
int CourseMark;
public Course()
{
}
public Course(String Name,int Mark)
{
CourseName=Name;
CourseMark=Mark;
}
public String getCourseName()
{
return CourseName;
}
public int getCourseMark()
{
return CourseMark;
}
}