Write a program segment to input data
element into a single dimension array
Answers
Answered by
1
Answer:
I am just telling the logic
Scanner sc = new Scanner(System.in);
System.out.print("Enter data:");
String[ ] val = (sc.nextLine()).split(" ");
//the value is stored in the variable val. Note that the values are separated by a whitespace
Similar questions