I dont want to hard code it. I know that you can have 2 arrays, one of string type to store names and the other of int type for the marks and then you can display them using the index of the element...
Type: Posts; User: nadirkhan
I dont want to hard code it. I know that you can have 2 arrays, one of string type to store names and the other of int type for the marks and then you can display them using the index of the element...
import java.util.Scanner;
public class InputArray
{
public static void main(String[]args)
{
String name = "";
{
Scanner ScanObj = new Scanner(System.in);