Java Revision Notes – IGNOU MCS-024

UNIT – 1 & 2

1. Paradigms of Programming Languages

The term paradigm describes a set of techniques, methods, theories and standards that together represent a way of thinking for problem solving.

The language paradigms are divided into two parts, imperative and declarative paradigms. Imperative languages can be further classified into procedural and object oriented approach. Declarative languages can be classified into functional languages and logical languages.

2. Comparison of Object Oriented and Procedure Oriented Approaches

In Procedural programming, a program is divided into functions and each function has a clearly defined purpose. Here we are least bothered about the data of the problem provided.

In Object Oriented programming (OOP), the basic idea behind OOP is to combine both, data and its functions that operate on the data into a single unit called object.

3. Concepts of OOP

Objects – An object is a software bundle of variables and related methods. You can represent real-world objects by using software objects.

Classes – A class is a blueprint, or prototype, that defines the variables and the methods common to all objects of a certain kind.

Encapsulation – The wrapping up of data and functions into a single unit is known as encapsulation.

Data Hiding – Insulation of the data from direct access by the program is known as data hiding

Inheritance  – It is the process by which objects of one class acquire the properties of objects of another class in the hierarchy. By using inheritance, new classes can be built from the existing old classes.

Polymorphism –  Polymorphism means the ability to take more than one form of the same property.  The purpose of polymorphism is to let one name be used in many actions, method overloading is one kind of polymorphism.

4. Benefits of OOPs

OOP provides greater programmer productivity, better quality of software and lesser maintenance cost.

UNIT – 3

Basic Features of Java

Platform Independent

Java is compiled to an intermediate form called Java byte-code. A program called the Java Virtual Machine reads the byte code, translates it into the corresponding host machine instructions and then executes the machine instruction. A Java program can run on any computer system for which a JVM (Java Virtual Machine) and some library routines have been installed.

You can develop the Java program on any computer system and the execution of that program is possible on any other computer system loaded with JVM.

Some others features are Object Oriented, Secure, Multi-threaded

Difference between Java applets and application programs

Java Application Program can be executed independently. Applications are executed at command line by Java.exe

Applet cannot be executed independently. Applets can only be executed inside a browser or appletviewer.

Datatype in Java

Integers – byte, short, int, long

Floating Point Numbers – float, double

Characters – char

Booleans – boolean

Kinds of variables in Java

• Instance variables • Class variables • Local Variables.

Java Operators

Arithmetic operators   + – * / %

Assignment Operators = += -= *= /=

Relational Operators > < >= <=

Boolean Operators && || !

Bitwise operator >> >>> << ~

Class and Object Operators – instance of, new




Leave a Reply