In java string with all types of function
Creating Strings
String str1 = “Hello”; // String literal
String str2 = new String(“World”); // Using a constructor
Basic Operations
Int length = [Link](); // Length of the string
Char firstChar = [Link](0); // Accessing characters
Boolean isEmpty = [Link](); // Check if empty
String concatStr = [Link](str2); // Concatenation
Comparison
Boolean isEqual = [Link](str2); // Compare content
Boolean isEqualIgnoreCase = [Link](“hello”); // Compare ignoring case
Int compareResult = [Link](str2); // Lexicographical comparison
Searching and Extracting
Int indexOfChar = [Link](‘o’); // Index of character
Int indexOfStr = [Link](“lo”); // Index of substring
Int lastIndex = [Link](‘l’); // Last index of character
String substring = [Link](1, 3); // Extract substring
Modifying
String replaced = [Link](‘l’, ‘L’); // Replace characters
String trimmed = “ Hello “.trim(); // Remove leading and trailing spaces
String lowerCase = [Link](); // Convert to lowercase
String upperCase = [Link](); // Convert to uppercase
Splitting and Joining
String[] parts = [Link](“ “); // Split into array
String joined = [Link](“-“, “2020”, “05”, “08”); // Join strings
Checking and Formatting
Boolean startsWith = [Link](“He”); // Check prefix
Boolean endsWith = [Link](“lo”); // Check suffix
String formatted = [Link](“Hello, %s!”, “World”);
Converting
Int intValue = [Link](“123”); // Convert to integer
String strValue = [Link](456); // Convert to string
Char[] charArray = [Link](); // Convert to character array
Byte[] byteArray = [Link](); // Convert to byte array