public class Test {
public static void main(String[] args)
{
// Here array is the array name of int type
int[] array = new int[4];
System.out.println("The size of the array is " + array.length);
// Here str is a string object
String str = "GeeksforGeeks";
System.out.println("The size of the String is " + str.length());
}
}
Last edited by admin on Sun Nov 17, 2019 8:52 am, edited 1 time in total.
Reason:Please put code inside [code] [/code]