Computer Science, asked by khushbukumaris142, 1 month ago

Write a program segment to input data
element into a single dimension array​

Answers

Answered by imtiyazallam
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