Classes


Classes and objects are basic concepts of object-oriented programming which revolve around the real life entities. A collection of objects is called a class. A class is a user defined blueprint or prototype from which objects are created. It represents the set of properties or methods that are common to all objects of one type. In general, class declarations can include the following components, in order: Constructors are used for initializing new objects. Fields are variables that provides the state of the class and its objects, and methods are used to implement the behavior of the class and its objects. There are various types of classes that are used in real world applications such as nested classes, anonymous classes, lambda expressions.

Review: Exceptions
    Which is NOT true about exceptions of Java?

      Exceptions under Error and RuntimeException classes are checked exceptions.
      The compiler allows an unchecked exception to compile.
      The throws keyword can be used to handle a checked exception.
      The try-catch block can be used to handle a checked exception.
        Result: