FEATURES OF JAVA:
(1)Compiled & Interpreted:-Usually a computer language is either compiled or interpreted.Java combines both these approaches thus making Java a two-stage system.First Java Compiler translates source code into bytecode.Bytecode is not machine instructions and therefore ,in the 2nd stage , Java interpreter generates machine code that can directly executed by the machine that is running the java program.
(2)Platform-Independent & Portable:-Java program can be easily moved from one computer to another,anywhere and anytime.
- Java ensures portability in two ways.First , Java compiler generates bytecode instructions that can be implemented on any machine.Secondly , the size of the primitive data types are machine-independent.
(3)Robust & Secure:-Java is robust language.It provides many safeguards to ensure reliable code.It has strict compile time and run time checking for data types.Java also incorporates the concept of exception handling which captures serious errors & eliminates any risk of crashing the system.
- Security becomes an important issues for a language that is used for programming on Internet.Threat of viruses and abuse of resources are everywhere.The absence of pointer in java ensures that programs cannot gain access to memory location without proper authorization.
(4)Object Oriented:-Java is true object-oriented language.Almost everything in java is an object.All program code & data reside within objects & classes.Java comes with an extensive set of classes, arranged in packages ,that we can use in our programs by inheritance.