COMPILED AND INTERPRETED:
In a computer language either compiler or interpreter is used. But in Java both are used .The Java compiler translates source code into bytecode. Bytecodes are not machine codes after compiles the program Java interpreter generates machine codes that can be executed or running the program that is why we can say that Java compiled and interpreted. These two steps provide security.
PLATFORM INDEPENDENT (PORTABLE):
Here Platform means the hardware and Software environment in which the program runs. Java programs can be easily moved from one computer to another. Changes and upgrades in operating system or any other system resources like processor etc.. Will not effect any changes in Java program. That is the main reason why Java is very popular language. The main question is how Java ensures portability? The answer is Java ensures portability in two ways first is Compiler generates bytecode that can be implemented in any machine and second is the size of the primitive data type are machine independent.
Java is a simple language. Java inherits the syntax of C language and C++ language. It does not use header files and pointers, go to statement like C and C++. Operator overloading and multiple inheritance are also not supported by Java. Java inherits the syntax of C language and C++ language like .It provides simple and easy way to fulfill a given task. Java is very easy language for those people who have knowledge of an object oriented language concept.
Java is a pure object oriented language meant everything in Java is an object, creating objects, manipulating objects and making objects work together. The objects and classes contain the program code and data. In Java everything is an object like Frames, Windows, all functions are associated with objects. The object model in Java is simple and easy to extend.
BASIC CONCEPTS OF OBJECT ORIENTED LANGUAGE ARE:
a)Object b)Class c)Inheritance d)Polymorphism e)Abstraction e)Encapsulation
Java is a distributed language means it is suitable for developing the network. It has the ability to share both data and programs. Java applications access remote objects on the internet. Java can handle TCP/IP Protocols. You can read and write objects on the remote sites via the URL. This helps the programmer at remote locations to work together on the same project.
Java is a robust language because of two reason first is strictly typed language and the process of memory management in an effective way. It has strict compile time and run time checking for data types. Java automatically deallocates the free memory that is no longer referenced by the objects (the help of garbage collector).
C & C++ FEATURES ELIMINATED:
Some of the dangerous features like Pointers , Preprocessor , Array index limit etc.. Are eliminated in Java. In c or c++ compiler is used but in Java JVM is used so we can say that Java is more secure than c or c++.
Java Supports multithreading means a programmer writes a program that can perform many tasks simultaneously. The thread is like a single separate program and multi means many threads .That means we can write a Java program that deal with many tasks at once by using multithreading concept.
WHERE IT IS USED:
What can we do with Java?
1)We can create colorful banner that can be displayed on Web Pages.
2)We can create interactive quiz that works as a standalone program.
3)We can create a program that plays audio and animates images at the same time.
4)We can create interactive games that can run as standalone programs or be deployed on the web.