String in-built basic and important functions to remember .

I am a engineering student who's determined to change the time ahead .
charAt(int index): Returns the character at the specified index.
javaCopy codechar charAtIndex = myString.charAt(3);length(): Returns the length of the string.
javaCopy codeint strLength = myString.length();substring(int beginIndex): Returns a substring starting from the specified index.
javaCopy codeString subString = myString.substring(2);substring(int beginIndex, int endIndex): Returns a substring within the specified range.
javaCopy codeString subString = myString.substring(2, 5);toLowerCase(): Converts all characters in the string to lowercase.
javaCopy codeString lowerCaseString = myString.toLowerCase();toUpperCase(): Converts all characters in the string to uppercase.
javaCopy codeString upperCaseString = myString.toUpperCase();trim(): Removes leading and trailing whitespaces from the string.
javaCopy codeString trimmedString = myString.trim();equals(Object another): Compares the content of two strings for equality.
javaCopy codeboolean isEqual = myString.equals(anotherString);equalsIgnoreCase(String another): Compares two strings for equality, ignoring case differences.
javaCopy codeboolean isEqualIgnoreCase = myString.equalsIgnoreCase(anotherString);startsWith(String prefix): Checks if the string starts with the specified prefix.
javaCopy codeboolean startsWithPrefix = myString.startsWith("abc");endsWith(String suffix): Checks if the string ends with the specified suffix.
javaCopy codeboolean endsWithSuffix = myString.endsWith("xyz");indexOf(int ch): Returns the index of the first occurrence of the specified character.
javaCopy codeint indexOfChar = myString.indexOf('a');lastIndexOf(int ch): Returns the index of the last occurrence of the specified character.
javaCopy codeint lastIndexOfChar = myString.lastIndexOf('a');contains(CharSequence sequence): Checks if the string contains the specified sequence of characters.
javaCopy codeboolean containsSequence = myString.contains("abc");replace(char oldChar, char newChar): Replaces all occurrences of a specified character with another character.
javaCopy codeString replacedString = myString.replace('a', 'b');