Stringname="Azka";intage=22;StringformattedString=String.format("My Name is %s, Im %d years old",// %f for double, %b for boolean
name,age);System.out.println(formattedString)
charvowels[]=newchar[5];// create new array containing char with the length of 5
// or
charvowels[]={'a','i','u','e','o'};Array.toString(vowels);Array.sort(vowels);charkey='o';intfoundItemIndex=Arrays.binarySearch(vowels,key);// other
Arrays.fill(vowels,"x")// replace all elements with "x"
charcopyOfVowels[]=Arrays.copyOf(vowels,vowels.length);intstartingIndex=1;intendingIndex=4;charcopyOfVowels[]=Arrays.copyOfRange(vowels,startingIndex,endingIndex);vowels==copyOfVowels// will return false because it's a different object
Arrays.equals(vowels,copyOfVowels)// to compare it's value