1. Object Oriented
Any programming language called as object oriented language then that language must be satisfied the following 4 principles.
E.g: CPP, Java
The languages that are not supporting inheritance and dynamic Polymorphism are called as “Object based language”.
E.g: VB, Java Script
Why C++ is partially OOP?
- According to pure OOP principle, no main() method/any method should be exist without the object. In C++, main() method can be independent and doesn’t need any class.
- C++ provides “Friends” which is absolute corruption to the OOP principle of “Encapsulation”.
- According to OOP principle, everything needs to be object. C++ provide inbuilt data types int, float etc. Which are not object in their nature. C# and Java also provides some kind of data type, but its inner presentation is always object. For example, in java you have got a wrapper classes. All these are derived from Object.
- According to OOP principle, one object should have only one hierarchical parent reference. But in C++, multiple inheritance contradicts its principle.
- In Java any function must be written in inside of the class, with out class program creation is not possible. Such type of languages are called as total OOP. Java supports this principle.
2. Java is multi threading
Multi threading means more than one action can be done at the same time within a program.
3. Java is platform independent
If the application compiled code is able to run in different operating systems then that application is said to be platform independent application. The programming language that is used to develop this application is called platform independent programming language. Java is platform independent programming language, because java program compiled code can run in all operating systems.
A platform is a hardware or software environment in which program runs.
This is used to convert the program into executable format.
E.g: Java, .Net
This is mainly used to executing the statements with help of processor.
E.g: Operating System
Java programming language comes under software platform. Which consisting 3 portions
- JDK (Java Development Kit)
- JRE (Java Runtime Environment)
- JVM (Java Virtual Machine)
- JDK also called as SDK (Standard Development Kit)
- JDK provides environment to develop and run java applications.
- JRE provides environment only to run java applications. For example, you installed java application in client machine, then the client is responsible for run java application, not responsible for develop java application. So here JRE is required.
- JVM is responsible to run our java application line by line. So here JVM is interpreter.
- Developer written program
- It is written according to the programming language syntax
Compiler generated code converted from source code
Converts the source code into machine language at once.
Converts the source code into machine language but line by line.
Operating System understandable code (.exe files)
4. Java is portability
Portability refers to the ability to run a program on different machines. Java byte code (.class file) run at any environment by JVM.
5. Java is robust
Robust simply means strong. Java uses strong memory management. There are lack of pointers that avoids security problems. There is automatic garbage collector in java. There is exception handling and type checking mechanism in Java. All these points makes java is robust.
Java programs will occupy same memory on all operating systems that means in windows integer takes 4 bytes, on Linux and Solaris also it will occupies same memory. So that memory management is same hence on one operating system the program is executing, same program will execute on any operating system. That’s why java program is reliable.
6. Java is architectural neutral
A language or technology is said to be architectural neutral which can run in any available processor in the real world. The languages like C, C++ are treated as architectural dependent. The language like Java can run on any of the processor. Irrespective of their architectural and vendor.
Portability = Platform Independent + architectural neutral
7. Java is distributed
A service is said to be distributed service which runs in multiple servers and that service is accessed by n number of clients across the globe. In order to develop distributed application we must require architecture called trusted network architecture. To develop those applications we require a technology called J2EE.