Java was developed by taking the best points from other programming languages, primarily C and C++. Java therefore utilises algorithms and methodologies that are already proven. Error prone tasks such as pointers and memory management have either been eliminated or are handled by the Java environment automatically rather than by the programmer. Since Java is primarily a derivative of C++ which most programmers are conversant with, it implies that Java has a familiar feel rendering it easy to use.
JAVA IS OBJECT-ORIENTED
Even though Java has the look and feel of C++, it is a wholly independent language which has been designed to be object-oriented from the ground up. In object-oriented programming (OOP), data is treated as objects to which methods are applied. Java's basic execution unit is the class. Advantages of OOP include: reusability of code, extensibility and dynamic applications.
JAVA IS DISTRIBUTED
Commonly used internet protocols such as HTTP and FTP as well as calls for network access are built into Java. Internet programmers can call on the functions through the supplied libraries and be able to access files on the Internet as easily as writing to a local file system.
JAVA IS INTERPRETED
When Java code is compiled, the compiler outputs the Java Bytecode which is an executable for the Java Virtual Machine. The Java Virtual Machine does not exist physically but is the specification for a hypothetical processor that can run Java code. The bytecode is then run through a Java interpreter on any given platform that has the interpreter ported to it. The interpreter converts the code to the target hardware and executes it.
JAVA IS ROBUST
Java compels the programmer to be thorough. It carries out type checking at both compile and runtime making sure that every data structure has been clearly defined and typed. Java manages memory automatically by using an automatic garbage collector. The garbage collector runs as a low priority thread in the background keeping track of all objects and references to those objects in a Java program. When an object has no more references, the garbage collector tags it for removal and removes the object either when there is an immediate need for more memory or when the demand on processor cycles by the program is low.
JAVA IS SECURE
The Java language has built-in capabilities to ensure that violations of security do not occur. Consider a Java program running on a workstation on a local area network which in turn is connected to the Internet. Being a dynamic and distributed computing environment, the Java program can, at runtime, dynamically bring in the classes it needs to run either from the workstation's hard drive, other computers on the local area network or a computer thousands of miles away somewhere on the Internet. This ability of classes or applets to come from unknown locations and execute automatically on a local computer sounds like every system administrator's nightmare considering that there could be lurking out there on one of the millions of computers on the Internet, some viruses, Trojan horses or worms which can invade the local computer system and wreak havoc on it.
Java goes to great lengths to address these security issues by putting in place a very rigorous multilevel system of security:
The bytecode verifier ensures that the code does not do any of the following:
Sun Microsystems will soon be adding yet another dimension to the security of Java. They are currently working on a public-key encryption system to allow Java applications to be stored and transmitted over the Internet in a secure encrypted form.
JAVA IS ARCHITECTURALLY NEUTRAL
The Java compiler compiles source code to a stage which is intermediate between source and native machine code. This intermediate stage is known as the bytecode, which is neutral. The bytecode conforms to the specification of a hypothetical machine called the Java Virtual Machine and can be efficiently converted into native code for a particular processor.
JAVA IS PORTABLE
By porting an interpreter for the Java Virtual Machine to any computer hardware/operating system, one is assured that all code compiled for it will run on that system. This forms the basis for Java's portability.
Another feature which Java employs in order to guarantee portability is by creating a single standard for data sizes irrespective of processor or operating system platforms.
JAVA IS HIGH-PERFORMANCE
The Java language supports many high-performance features such as multithreading, just-in-time compiling, and native code usage.
By connecting to the Internet, a user immediately has access to thousands of programs and other computers. During the execution of a program, Java can dynamically load classes that it requires either from the local hard drive, from another computer on the local area network or from a computer somewhere on the Internet.
● features of Java:
- The Java Virtual Machine
- Garbage Collection
- Code Security
Java Features:
● Java Virtual Machine (JVM)
- an imaginary machine that is implemented by emulating software on a real
machine
- provides the hardware platform specifications to which you compile all Java
technology code
Bytecode
- a special machine language that can be understood by the Java Virtual
Machine (JVM)
- independent of any particular computer hardware, so any computer with a
Java interpreter can execute the compiled Java program, no matter what
type of computer the program was compiled on.
● Garbage collection thread
- responsible for freeing any memory that can be freed. This happens
automatically during the lifetime of the Java program.
- programmer is freed from the burden of having to deallocate that
memory themselves
● Code security is attained in Java through the implementation
of its Java Runtime Environment (JRE).
JRE
- runs code compiled for a JVM and performs class loading (through
the class loader), code verification (through the bytecode verifier)
and finally code execution.
Class Loader
- responsible for loading all classes needed for the Java program
- adds security by separating the namespaces for the classes of the
local file system from those that are imported from network sources
- After loading all the classes, the memory layout of the executable is
then determined. This adds protection against unauthorized access
to restricted areas of the code since the memory layout is
determined during runtime
Bytecode verifier
- tests the format of the code fragments and checks the code
fragments for illegal code that can violate access rights to objects.
Some of the characteristics of Java are:
a. It is easy to learn and code
b. It is object oriented
c. It has a lot of features
d. It is platform independent
e. Almost all platforms can run java programs
f. Java is free
g. Java is robust
h. It supports multithreading
i. It is secure
j. It is dynamic and extensible.
Five feature of Java:
Java is an high-level, object-oriented programming language, much like C++. The three main principles used in its development were Inheritance, Encapsulation, and Polymorphism.
Some features are:
1. Inheritance
2. Polymorphism
3. Data Encapsulation
4. Data Abstraction
etc...
EFRETRQETQ
Java Classpath is a parameter that tells the Java Virtual Machine or the Java Compiler, where to search for user-defined classes and packages on a computer.
C, C++ and Java are cross-platform languages. NET is for Windows-only.
You don't have to rewrite your code to get it working 2 or more OS' That cuts down development cost and time by a lot.
There is no concept similar to pointers in Java. Pointers are a feature in C programming using which a programmer can access the memory. This was the cause of major catastrophic programming bugs. The creators of Java excluded this feature just to avoid such catastrophic bugs.
Because goto statements usually result in hard to read code. This was a feature of C++ which the creators of Java decided they didn't want to allow.
None, as C was made prior to Java.
The Java 'this' installation package allows one to create installation programs for their Java based applications. One can download the program from Java.
Java Classpath is a parameter that tells the Java Virtual Machine or the Java Compiler, where to search for user-defined classes and packages on a computer.
Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java
Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java
C, C++ and Java are cross-platform languages. NET is for Windows-only.
Core java refers to the core or basic concepts of the Java programming language. Things like encapsulation, inheritance, multi-threading, exception handling and other basic feature of java that comes as part of the Java standard edition forms Core Java
Beacuase Java's Concept is OOP object oriented programming and with grate feature include better then assembly lang.
You don't have to rewrite your code to get it working 2 or more OS' That cuts down development cost and time by a lot.
There is no concept similar to pointers in Java. Pointers are a feature in C programming using which a programmer can access the memory. This was the cause of major catastrophic programming bugs. The creators of Java excluded this feature just to avoid such catastrophic bugs.
The purpose of the include key word is to include the functionality of some class into the class under consideration. The same feature is provided in Java using the import statement. Hence there is no use of the include key word in Java.
class is a blueprint which does not have its own existence but it can pass all of its feature to its child classes.