Back to Code Walkthrough
String Length and charAt
Java code walkthrough · Question 17Code
Read carefully. What does this print?1public class Main {2 public static void main(String[] args) {3 String word = "Hello";4 System.out.println(word.length());5 System.out.println(word.charAt(1));6 System.out.println(word.charAt(4));7 }8}