Working With Strings in Java – Part 1
class Test { public static void main(String[] args) { String str = “alegru”; char c = str.charAt(2); System.out.println(c); } } Output: e class Test { public static void main(String[] args) { String str = “alegru”; int index = str.indexOf(‘l’); System.out.println(index); } } Output: 1 class Test { public static void main(String[] args) { String str…
Read More Working With Strings in Java – Part 1