This is my homework assignment, I do not really know about Code, so, anyone can help me?
class Test {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String string = scan.nextLine();
int index = scan.nextInt();
System.out.println(string.charAt(index));
}
}