I know this is just a simple java array problem, but I don’t have any idea how to do this.What I want to do is like this:
Student Score Graph
John 3 ***
Mark 2 **
James 1 *
What I have in mind is an array like this:
String[][] students = { { "John", "Mark", "James" }, { "3", "2", "1" } };
How will I print the line graph without adding another set of variables in the array? I want it to just display asterisks (*) according to the number of score.
You can do something like below
Output