01

Cards (14)

  • Number
    An abstract class defined in the java.lang package that serves as the superclass for all numeric wrapper classes such as Integer, Double, Float, Long, Short, and Byte
  • Number class
    • Provides common methods for converting numeric values to other primitive data types like int, long, float, and double
  • Methods in Number class
    • intValue()
    • longValue()
    • floatValue()
    • doubleValue()
  • Methods in Number class are used to obtain the corresponding primitive values of the wrapped number
  • Bounded type parameters
    Used to restrict the types that can be used as type arguments in a parameterized type, e.g. a method that operates on numbers might only want to accept instances of Numbers or their subclasses
  • Interfaces
    Deal with abstract data types, help in the independent manipulation of java collections from representation details, and are used to achieving multiple inheritance in java forming hierarchies
  • Generic interface
    An interface that declares one or more type parameters, which act as placeholders for the actual data types that implementing classes will use
  • Collection
    A framework that provides an architecture to store and manipulate the group of objects
  • Java Collection

    A single unit of objects
  • ArrayList
    A class that implements the List interface, uses a dynamic array to store the duplicate element of different data types, maintains the insertion order, and allows random access to the elements
  • ArrayList is internally backed by the array in Java
  • We cannot store primitive type in ArrayList, it stores only objects and automatically converts primitive type to object
  • Array
    A basic functionality provided by Java, whereas ArrayList is a class of Java Collections framework
  • ArrayList belongs to java.util package