Here’s a list of commonly used String methods in Java — just the method names with a
quick note:
🔤 Java String Methods
1. length() – returns length of the string
2. charAt(int index) – returns character at given index
3. substring(int beginIndex)
4. substring(int beginIndex, int endIndex)
5. toLowerCase()
6. toUpperCase()
7. trim() – removes leading/trailing spaces
8. equals(String another) – checks exact match
9. equalsIgnoreCase(String another)
10. `compareTo
✅ 1. Lambda Expressions
List<String> list = [Link]("a", "b", "c");
[Link](s -> [Link](s));
✅ 2. Functional Interfaces
@FunctionalInterface
interface MyFunc {
void sayHello();
}
MyFunc f = () -> [Link]("Hello");
[Link]();
✅ 3. Streams API
List<Integer> nums = [Link](1, 2, 3, 4, 5);
[Link]().filter(n -> n % 2 == 0).forEach([Link]::println);
✅ 4. Default Methods in Interfaces
interface A {
default void show() {
[Link]("Default method");
}
}