Computer Science, asked by thara135, 1 year ago

how to get array inputs in java?

Answers

Answered by Saran33
2
1. import java. util. Scanner;
2. public class FriendsName
3.{public static void main(String[] args)
4. {Scanner scan = new Scanner(System. in);
5. //Decide the number of friends.
6. System. out. ...
7. int numOfFriends = Integer. parseInt(scan. ...
8. //Create a string array to store the names of your friends.
Similar questions