Basics about Core Java
Core Java - Three basic elements in Java: 1) Class: A class is a group of objects which have common properties. It is a template or blueprint from which objects are created. It is a logical entity. It can't be physical. A class in Java can contain: Fields Methods Constructors Blocks Nested class and interface 2) Interface: An interface in Java is a blueprint of a class. It has static constants and abstract methods. The interface in Java is a mechanism to achieve abstraction . There can be only abstract methods in the Java interface, not method body. It is used to achieve abstraction and multiple inheritance. In other words, you can say that interfaces can have abstract methods and variables. It cannot have a method body. 3). Enum: An enum type is a special data type that enables for a variable to be a set of predefined constants . The variable must be equal to one of the values that have been predefined ...