public class p48{ public static void main(String[] args){ String[] array={"Java","is","greate"}; int num = 0; for (int i = 0;i<array.length;i++) { System.out.print(array[i]+" "); num += array[i].length(); } System.out.println("avg is:"+ (float) num/array.length); } }