Advertisement
Guest User

Untitled

a guest
Nov 9th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TestZaStringToChar {
  4. public static void main(String[] args) {
  5. Scanner scan = new Scanner(System.in);
  6. String string = scan.nextLine();
  7. String []niza1 = string.split(" <-> ");
  8. char []nizaChar = new char[niza1.length];
  9. for(int i = 0; i < niza1.length ; i++)
  10. {
  11. nizaChar[i] = niza1[i].charAt(0);
  12. }
  13. }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement