How to use array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to use array

I'm stuck in third quiz which is reverse a String. I don't understand it. I don't know how to create the process. Example Input : hello Output : olleh My code: import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(; String text = scanner.nextLine(); char[] arr = text.toCharArray(); System.out.print(arr); } }

19th Feb 2021, 11:36 AM
Rocastle Asing
Rocastle Asing - avatar
3 Answers
+ 3
This an example with array will help you:
19th Feb 2021, 1:17 PM
JaScript - avatar
+ 2
Please add-show your attempt so the community can help you more easily :) Edited: Now added.
19th Feb 2021, 11:47 AM
Matthew - avatar
+ 1
Which language?
19th Feb 2021, 11:41 AM
Matias - avatar