void inputPerson(){


System.out.print("학년 : "); grade = scan.nextInt();

System.out.print("학번 : "); num = scan.nextInt();

System.out.print("이름 : "); name = scan.nextLine();

System.out.print("주소 : "); address = scan.nextLine();



이런 식으로 이름 받아서 바로 출력하는데


 학년이랑 학번은 int라 그런가 잘나오는데


이름 주소는 이름이 씹히고, 주소만 출력되더라고


왜 그런거임?




출력 부분은 이래


System.out.println("["+(q+1)+"] "

+student1[q].getGrade()+" 학년  "

+person1[q].getNum()+" 학번 "

+person1[q].getName()+" [주소 : "

+person1[q].getAddress()+" "

);