import java.util.Arrays;
public class Main{
public static void main(String []args){
char c1='s';
String str1="rock";
char[] str2= {'s', 't', 'a', 'r'};
String str3=new String("star");
String str4="star";
System.out.println(str1+" "+str3);
System.out.println(str1.toUpperCase()+ " "+str3.toUpperCase());
System.out.println(Arrays.toString(str2));
int arrLength = str2.length;
System.out.println("The length of array is: " + arrLength);
System.out.println(str1+ str1.length());
System.out.println(str2.length);
}
}
Output:
rock star
ROCK STAR
[s, t, a, r]
The length of array is: 4
rock4
4