String Methods in Java
Use common String methods: substring, equals, contains, replace, split, and trim.
Use common String methods: substring, equals, contains, replace, split, and trim.
Build mutable text efficiently with StringBuilder (or StringBuffer when thread-safe).
Select among many options with switch (classic and enhanced switch).
Use classic for loops and enhanced for-each loops over arrays/collections.
Exit loops early with break or skip an iteration with continue.