0

Is it correct but output comes vertical .so what i do?

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String text = scanner.nextLine(); char[] arr = text.toCharArray(); for(char c:arr) { System.out.println(c); } //your code goes here } }

6th Sep 2021, 10:25 AM
Amala Yakin
3 ответов
+ 2
Remove ln from System.out.println System.out.print(c);
6th Sep 2021, 10:27 AM
Vadivelan
+ 2
AML Yakin println add new line so just write print
6th Sep 2021, 10:38 AM
A͢J
A͢J - avatar
0
Is it right? Java can use print
6th Sep 2021, 10:46 AM
Amala Yakin