✏️ Explanatory Question
(a) A String method that results in a positive integer only:length() → This method returns the length of the string as a positive integer.
Example:
String str = "Hello";
System.out.println(str.length()); // Output: 5
(b) A String method that results in a character:charAt(int index) → This method returns the character at the specified index.
Example:
String str = "Hello";
System.out.println(str.charAt(1)); // Output: 'e'