Advertisement
Guest User

Java

a guest
Feb 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1.    public static Scanner scan = new Scanner(System.in);
  2.    public static String string;
  3.    public static String[] arr;
  4.    
  5.    public static void main ()
  6.    {
  7.        System.out.print("Enter a string");
  8.        string = scan.nextLine();
  9.        arr = string.split("");
  10.        for (int i = 0; i < arr.length; i++)
  11.        {
  12.            System.out.println(arr[i]);
  13.        }
  14.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement