Friday, January 1, 2016

Java Features

java fetaures


Java Features:

1.Simple and familiar
2.Platform independent
3.Portable
4.Architecture Neutral
5.Robust
6.Dynamic
7.Object Oriented
8.Secured
9.Distributed
10. Multi-threaded

1.Simple and familiar:
     Java simplifies programmers job by removing some features of C ,C ++ languages.
1.No pointers.
2.No make files and header files.
3.No Explicit memory management.

Java is familiar because the syntax of  Java is similar to C , C ++ languages.

Q) What is Platform?
Platform is a software which provide runtime environment for applications/programs.

1.Process management.
2.IO management.
3.Device management.
4.Memory management.

Platform is a software which build on hardware.
Operating System is called Platform.

Q) What is Platform dependence ?
--In this approach the code which is designed to work on a OS cannot be executed on other OS. Because once we compile the source code it generates machine code which is specific for the OS on which it was prepared.
--C , C++ are called Platform dependent languages.

2.Platform Independence:
There are two types of platforms.
1.software based
2.hardware based

--Java provides software-based platform.It has two components.

1.Runtime Environment
2.API(Application Programming Interface).

Java code is compiled by the compiler and converted into bytecode.This bytecode is a platform independent code because it can be run on multiple platform i.e,Write Once Run Anywhere (WORA).


3.Portable: 

We may carry the java byte code to any platform.

4.Architecture Neutral:
There is no implementation features e.g. Size of Primitive types is set.The behaviour of java program does not change from one OS to another OS.In java memory layout decisions are not made at compile time.

5.Robust:

Robust simply means strong. Java uses strong memory management. There are lack of pointers that avoids security problem. There is automatic garbage collection in java. There is exception handling and type checking mechanism in java. All these points makes java robust.

Q) What is Byte Code ?

Compiled code of Java source program is called byte code.Byte code is not a machine code.It does not have any instructions related to Operating System.Byte code is platform independent code. Byte code is not a 0 & 1. It is a collection of mnemonics.Byte code is a Java Virtual Machine code.

Q) What is the difference between Byte code and machine code ?

Byte CodeMachine Code
1.Compiled code of Java. Compiled code of C,C++.
2.It is a collection of mnemonics. It is a collection of 0 & 1.
3.Platform independent Platform dependent.
Mnemonics is called as collection of verbs or commands.

JVM: 

JVM is a software which provides runtime environment for java applications or programs.It is provided by Java.It is developed in C , C++.JVM is a specification ,abstracts given by SUN Micro systems to develop java apps.
JVM is developed by 3 people.
1.SUN micro systems.
2.OS vendors.
3.3rd party vendors.
JVM is platform dependent program.JVM translates the byte code into machine code and execute.JVM is virtual machine because it is not hardware.JVM provides JIT (Just In Time) compiler which translates byte code to machine code.

6.Dynamic:

Linking or Loading of the programs are of two types.
1.Static Loading
2.Dynamic Loading.

Staic Loading:Loading or Linking of all executable blocks before executing program is called Static Loading.C,C++ uses static loading/linking.
Disadvantages:
1.Wastage of memory.
2.Any changes in one program need to compile all programs.This is called fragile problem.
Dynamic Loading:Loading or Linking of all executable blocks during execution of program is called Dynamic Loading.Java uses dynamic Loading.

7.Object Oriented:

Java is an Object Oriented Programming Language.Object Oriented is not a language,it is a programming principle.Programming principle define set of rules and regulations for organization of data and instructions.

8.Secured:
Java is secured because there is no pointers in java.Pointers perform illegal operations like accessing memory which is not part of program.There is no pointer arithemetic in java.

9.Distributed:
Java allows you to develop networking applications.It provides set of predefined protocols.

10.Multi Threaded:
Java allows you to develop thread based multitasking applications,Multitasking allows to execute more than one operation concurrently(simultaneously).


1 comment: