Explain Base type

Base type: The kind of items that might be stored in an array - the arrays defined type. For example, in

    int[] numbers;

the base type of numbers is int. Here the base type is a class type; it points out the lowest super type of objects which might be stored in the array. For example, in

Ship[] berths;

Just instances of the Ship class might be stored in berths. When the base type of an array is Object, instances of any class might be stored in it.

   Related Questions in Programming Languages

©TutorsGlobe All rights reserved 2022-2023.