Java’s String class encapsulates an array of bytes. A byte can be converted to a char, in which case, String becomes an array of characters used to compose words, sentences, or any other data you want ...
//for array len=a.length...for str len=s.length()..."()"this fun symbol use is necessary /*arr.length here .length is a field... In Java, a field refers to a variable that is a member of a class or an ...
System.out.println(s1.substring(2)); //from 2nd index to last System.out.println(s1.substring(0, 1)); System.out.println(s1.substring(2,4)); //from 2nd index to 4th index ...