Wednesday, May 4, 2016

Topic 1: Characteristics of Java

  • Java is case-sensitive.

  • Object-oriented programming (OOP) is at the core of Java.

  • Encapsulation

Encapsulation binds together code and the data it manipulates, and keeps both safe from outside interference and misuse. In Java, the basis of encapsulation is the class.

  • Inheritance

Inheritance is the process by which one object acquires the properties of another object. By use of inheritance, an object need only define those qualities that make it unique within its class. It can inherit its general attributes from its parent.

  • Polymorphism

Polymorphism is a feature that allows one interface to be used for a general set of actions.

  • Abstraction

It refers to defining a skeleton of the class that should be implemented by its subclass. This can be achieved using abstract keyword in Java.

  • In Java, all code must reside inside a class. Java program is basically a text file with one or more class definitions. This text or source file is called a compilation unit.

  •  The Java compiler requires that a source file use the .java filename extension.

  • By convention, the name of the class should match by case the name of the file that holds the program.

  • All statements in Java end with a semicolon.

  • Java is a Strongly Typed Language 

    • Every variable and every expression has a type, and every type is strictly defined. 

    • All assignments, whether explicit or via parameter passing in method calls, are checked for type compatibility. The Java compiler checks all expressions and parameters to ensure that the types are compatible. Any type mismatches are errors that must be corrected before class compilation.


Click for NEXT article


Please feel free to correct me by commenting your suggestions and feedback.