Simple
Object-Oriented
Java is an object-oriented language, which means that you focus on the data in your application and methods that manipulate that data, rather than thinking strictly in terms of procedures.In an object-oriented system, a class is a collection of data and methods that operate on that data. Taken together, the data and methods describe the state and behavior of an object. Classes are arranged in a hierarchy, so that a subclass can inherit behavior from its superclass.
Java comes with an extensive set of classes, arranged in packages, that you can use in your programs.
Distributed
Interpreted
The Java compiler generates byte-codes, rather than native machine code. To actually run a Java program, you use the Java interpreter to execute the compiled byte-codes. Java byte-codes provide an architecture-neutral object file format. The code is designed to transport programs efficiently to multiple platforms.Robust
Java has been designed for writing highly reliable or robust software:Secure
Security is an important concern, since Java is meant to be used in networked environments. Without some assurance of security, you certainly wouldn't want to download an applet from a random site on the net and let it run on your computer. Java's memory allocation model is one of its main defenses against malicious code (e.g can't cast integers to pointers, so can't forge access). Furthermore:Architecture-Neutral
Portable
High-Performance
Java is an interpreted language, so it will never be as fast as a compiled language as C or C++. In fact, it is about 20 times as slow as C. However, this speed is more than enough to run interactive, GUI and network-based applications, where the application is often idle, waiting for the user to do something, or waiting for data from the network.Multithreaded
Java allows multiple concurrent threads of execution to be active at once. This means that you could be listening to an audio clip while scrolling the page and in the background downloading an image. Java contains sophisticated synchronization primitives (monitors and condition variables), that are integrated into the language to make them easy to use and robust.Dynamic
Java was designed to adapt to an evolving environment: Even after binaries have been released, they can adapt to a changing environment Java loads in classes as they are needed, even from across the networt.It defers many decisions (like object layout) to runtime, which solves many of the version problems that C++ has Dynamic linking .Applications in java
we can create 2 types of applications in java
1. Standalone app
2. Applets
A Java applet is a small application written in Java and delivered to users in the form of bytecode. The user launches the Java applet from a web page and it is then executed within a Java Virtual Machine (JVM) in a process separate from the web browser itself. A Java applet can appear in a frame of the web page, a new application window, Sun's AppletViewer or a stand-alone tool for testing applets. Java applets were introduced in the first version of the Java language in 1995.
Java applets can be written in any programming language that compiles to Java bytecode. They are usually written in Java but other languages such as Jython,[8] JRuby,[9] Scala or Eiffel (viaSmartEiffel)[10] may be used as well.
No comments:
Post a Comment