-1
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]);
}
}

Edited by Nick Evan: Added code-tags

Votes + Comments
Don't start new threads every post
4
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by VernonDozier
0

I see nothing wrong with this code, assuming the student's names are in integer format. What do you think, 78 111 114 109?

0

You need to post some questions with the code describing your problems.
You also should add comments to the code describing what the code is supposed to do.

0

sorry im just new here i dont know the rules

Then READ the rules. They're right next to the logout button, at least some of them. Two possibly aren't there:

  1. One open thread per topic.
  2. Don't PM people for help. Just post on the public forum.

Read this too. If you follow all the rules and act lik you're willing to put in effort, people will help.

http://catb.org/~esr/faqs/smart-questions.html

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.