Vote count:
0
public class PlayerName {
public void playerName(){
int []playerNames = new int[playerNames[[n]];
for(int n=0; n<=playerNames[n];n++){
playerNames[n] = Helper.readInt("Enter no of players playing: " );
}
}
}
This is how my code looks like. been trying to initialize an array based on user input but they say i must create a local variable named n.
asked 50 secs ago
How can i create an array based on the user input?
Aucun commentaire:
Enregistrer un commentaire