String 4.17
can be called directly with class name. No need to invoke them with object as
we normally do with class objects.
Line Nos. 11 and 19 and 23: Display
Array(myArray); I a static method displayed in
the same class. Hence we have used the specifier static.
Line Nos. 14 to 17: populate the arrays with values (4*i) and I in a loop.
Line No. 21: calls Arrays.sort(myArray) to sort the array
4.4 String
A String is an array of characters or a sequence of characters. In Java, the String occupies an
important position and role because Java is a language created for network and to transmit
data on the network we have to use the Strings. In C or C++, a string is an array of character,
with the last one being ‘\0’. In Java, this is not so. A