import java.util.Scanner;
public class StudentList{
public static void main(String [] args){
Scanner console=new Scanner(System.in);
String students[]=new String [10];
System.out.println("Enter names of students");
for(int i=0;i<students.length;i++)
students[i]=console.nextInt();
System.out.println("Students entered are");
for(int i=0;i<students.length;i++)
System.out.println(students[i]);
}
}
Recommended Answers
Jump to PostDon't start a new thread every time you post. Continue one the first one.
Jump to PostI see nothing wrong with this code, assuming the student's names are in integer format. What do you think, 78 111 114 109?
All 5 Replies
NormR1 563
Posting Sage Team Colleague
churva_churva -9
Junior Poster
jon.kiparsky 326
Posting Virtuoso
NormR1 563
Posting Sage Team Colleague
VernonDozier 2,218
Posting Expert Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.