Amity School of Engineering
B.Tech., CSE(5th Sem.)
Java Programming Topic: Features of Java ANIL SAROLIYA
Some Revision of Programming
Software: It is the logical part of computer system, which is made up by several programs. In short, It is set of Programs. Program: These are the set of instructions directing the computer to do some action Machine language: This language is directly access by computer system. It is based on circuit switching, means mapping the binary values(based on only 0, 1 combinations) towards circuit. High-level programming languages Languages approximating(similar to) natural language syntax Example terms: read, write, and add Syntax: This is the grammatical rules of programming language Compiler: It translates high-level code into object program or object code Interpreter: It converts and executes statements line by line (but directly into machine code) Debugging: Its locating(discovering or 2 finding) and repairing the errors
Learning About Java
Java was developed by Sun Microsystems
Object-oriented language modeled after C++ Designed for interactive Web-based applications Also suitable for general purpose applications
Java is architecturally neutral
(Means Machine Independent or Operating System(OS) Independent)
Java Source Code is compiled and interpreted Source code: It is the form of Java program Java programs run on Java Virtual Machine (JVM) Three step process from source code to executable
Source code written in text editor Java compiler translates into bytecode (binary program) Java interpreter executes the bytecode line by line in JVM
3
JAVA Environment
Features of Java (Through features you can also define the java)
Simple Object Oriented Distributed Interpreted Robust Secure Architecture Neutral Portable High Performance Multithreaded and Dynamic programming language.
5
Java is Simple
Java was developed by taking the best points from other programming languages,
It manly borrows the C and C++ syntax
Is free from pointers
Uses Garbage Collection (Automatic)
Does not use header files and preprocessors (like #include or #define)
6
Java is Object Oriented
Java is not hybrid like C++. Java supports the basic notions of OO Methodology:
Encapsulation Data Abstraction Inheritance (gives the reusability aspect)
Single and multiple inheritance
Polymorphism Persistence [object (data) survives in the program execution time] Delegation
7
Java is distributed by nature Works on a variety of platforms Provides support for:
Networking: via Socket Programming Internet: The widely used protocols like HTTP and FTP are
developed in java
Remote Objects: Internet programmers can call functions on
above protocols and can get access the files from any remote machine on the internet rather than writing codes on their local system.
Example: Remote Method Invocation
8
JAVA is Interpreted
The Java Compiler generates bytecode for a JVM (Java Virtual Machine) A Java Interpreter is needed to execute the bytecode
Java Virtual Machine, it converts bytecode into machine language
Intermediate form between High Level Language code to machine code Java Program coded by the Programmer
9
JAVA is Robust (Strong)
Exception and Error handling Multi-Tasking Memory protection and management
Allows Modular development
Extensive compile-time checking
10
JAVA is Secure
The Java language has built-in capabilities to ensure that violations of security do not occur. The features of bytecode and its interpretation, prevent unintentional or intentional sabotage of compiled programs.
Java uses the public key encryption system to allow the java applications to transmit over the internet in the secure encrypted form.
Apart from all these, java security has been considered in many levels.
11
JAVA is Architecture Neutral
Bytecode can run on any platform (with the help of JVM). Write once run anywhere. JDK implementation on many platforms.
JAVA is Portable
The bytecodes can be run on virtual machines (VM) above different operating systems :
MacOS, Windows XP/Vista/2007, Solaris, OS2, Linux, Unix, etc
It can also run directly on hardware
12
JAVA is High-Performance
Java language supports many high-performance features such as multithreading, just-in-time compiling, and native code usage.
Multithreading concept allows the java programming language to do more than one task in a program Some times interpreted code are proper for particular hardware (processor and its instruction set), for this JIT compilers were introduced. JIT compilers (available with latest JVM) again compiles the interpreted code at run time and gives almost native code (only made for specific type of hardware according to its instruction-set ) speed.
13
JAVA is Dynamic
Java provides dynamic linking of the binary code at runtime. Objects are ready to available on the internet: While executing the java program the user can get the required files dynamically from a local drive or from a computer thousands of miles away from the user just by connecting with the Internet.
14
Amity School of Engineering B.Tech., CSE(5th Sem.)
Thanks
15