OneCompiler

PracticeArrayThree

117

import java.util.*;

public class PracticeArrayThree {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();

  char c[] = s.toCharArray();
  char c1=s.charAt(0);//returns the char value at the 4th index
  
  System.out.println(c);
  System.out.println(c1);
}

}