5. What is Java?
Java is a computing platform for application development
and an object-oriented,
Class-based and Concurrent programming language
It means many statements can be executed at the same time
instead of sequentially executing it.
Java can run on all platforms and free to access.
Important points:
It is platform-independent
i.e., java code can be compiled on any operating system
It supports concurrency
means the code can be executed by multiple processes at
the same time.
Prathibha Virtual Classes
6. Tools You Need
a Pentium 200-MHz computer with a minimum of 64 MB
of RAM (128 MB of RAM recommended).
Software's −
Linux 7.1 or Windows xp/7/8 operating system
Java JDK 8
Microsoft Notepad or any other text editor
Prathibha Virtual Classes
7. Why is Java so popular?
Java has become a popular and useful programming
language because of its excellent features, which play a
very important role in contributing to the popularity of
this language.
The Java features are called “Java Buzz Words”.
Java is one of the most used programming languages,
which allows the development of various types of
applications that may run on a single machine.
It is one of the most popular programming languages
around the globe and is introduced to keep running on
any stage consistently.
Prathibha Virtual Classes
9. Simple:
The Java programming language is easy to learn.
Java coding style is easy to read and write and eye catching.
Most of the concepts are drew from C++ thus making Java learning
simpler.
It contains many features of other Languages like C and C++
Java removes complexity because it doesn't use pointers and doesn't
support Multiple Inheritance.
Portable:
Java programs can execute in any environment for which
there is a Java run-time system.(JVM)
Java programs can be transferred over World Wide Web (e.g Applets)
Java programs can be run on any platform (Linux, Solaris , Window and Mac)
In Java, the size of the primitive data types is machine-independent, which
were dependent in C/C++. So, these provisions make Java programs portable.
Moreover, any changes and updates made in Operating Systems, Processors
and System resources will not enforce any changes in Java programs
Prathibha Virtual Classes
10. Object-Oriented:
Java is a true object-oriented language.
Like C++ java provides most of the object oriented features.
Unlike C++ which is semi object-oriented, Java is a fully
object-oriented programming language.
It has all OOP features such as
Abstraction, Encapsulation, inheritance and Polymorphism.
Almost everything in Java is an object
All programs code and data reside within objects and
classes
Java comes with an extensive set of classes
arranged in packages
For example, we cannot develop an executable program in
Java without making use of the class.
Prathibha Virtual Classes
11. Robust
Java is robust as it is capable of handling run-time errors,
supports automatic garbage collection, Exception handling, and
avoids explicit pointer concept.
Java has a strong memory management system.
Java is garbage-collected language – JVM automatically deallocates
the memory blocks
Java has the concept of exception handling which identifies
runtime errors and eliminates them.
Networked
Java is mainly designed for web based applications.
Java marks lot of complexity by providing classes for you
that already implements the hard parts, such as
creating socket connections,
reading the contents of the URL as a file etc.
Moreover, J2EE is used for developing network based
applications.
Prathibha Virtual Classes
12. Platform Independent
It is the most significant feature of Java .
Being platform-independent means a program compiled on one
machine can be executed on any machine in the world without any
change.
Java achieves platform independence by using the concept of
the BYTE code.
“Write Once, run anywhere” (WORA) slogan for Java comes in,
which means that we can develop applications on one environment
(OS) and run on any other environment without doing any
modification in the code.
Prathibha Virtual Classes
13. Dynamic and Extensible
Java is dynamic and extensible means with the help of
OOPs, we can add classes and add new methods to
classes, creating new classes through subclasses.
This makes it easier for us to expand our own classes and
even modify them.
Java gives the facility of dynamically linking new class
libraries, methods, and objects.
Java even supports functions written in other languages
such as C and C++ to be written in Java programs.
These functions are called “native methods”.
These methods are dynamically linked at runtime.
Prathibha Virtual Classes
14. Compiled and Interpreted
Usually, a computer language can be either compiled or
interpreted. Java integrates the power of Compiled
Languages with the flexibility of Interpreted Languages.
Java compiler (javac) compiles the java source code into the
byte code.
Java Virtual Machine (JVM) then executes this byte code
which is executable on many operating systems and is
portable.
Prathibha Virtual Classes
15. Secure:
Java is designed with security features built into the language and
runtime system such as static type-checking at compile time and
runtime checking
It enables to develop virus-free, tamper-free systems.
Java is a more secure language as compared to C/C++, as it does not
allow a programmer to explicitly create pointers.
Java supports access modifiers to check memory access and also
ensures that no viruses enter an applet.
Authentication techniques are based on public-key encryption.
It has a byte code verifier that checks the code fragments for any
illegal code that violates the access right.
Prathibha Virtual Classes
16. Architecture-neutral
Java is not tied to a specific machine or operating system
architecture.
Machine Independent i.e., Java is independent of
hardware.
Java compiler generates an architecture-neutral object file
format, which makes the compiled code executable on
many processors, with the presence of Java runtime
system.
Familiar
Java is familiar because:
It has a base of familiar languages like C and C++ and contains
many features of these languages.
It removes the drawbacks, complexities and confusing
elements of C/C++.
So if you have good knowledge of C/C++, you will find Java
familiar and easy to understand.
Prathibha Virtual Classes
17. High Performance
The performance of Java is impressive for an interpreted
language because of its intermediate byte code.
Java provides high performance with the use of “JIT –
Just In Time compiler”,
in which the compiler compiles the code on-demand basis,
i.e., it compiles only that method which is being called.
This saves time and makes it more efficient.
Java architecture is also designed in such a way that it
reduces overheads during runtime.
The inclusion of multithreading enhances the overall
execution speed of Java programs.
Byte codes generated by the Java compiler are highly
optimized, so Java Virtual Machine can execute them
much faster.
Prathibha Virtual Classes
18. Distributed
Java is distributed because it encourages users to create
distributed applications.
In Java, we can split a program into many parts and store
these parts on different computers.
A Java programmer sitting on a machine can access another
program running on the other machine.
This feature is very helpful when we develop large projects.
Java was designed with the distributed environment. It has
networking facilities, so it can be transmit, run over
internet.
for example. RMI (Remote Method Invocation) and EJB
(Enterprise Java Beans)are used for creating distributed
applications.
Java comes with an extensive library of classes for
interacting, using TCP/IP protocols such as HTTP and FTP,
which makes creating network connections much easier than
in C/C++.
It also enables multiple programmers at many locations to
work together on a single project.
Prathibha Virtual Classes
19. Multi-threaded and Interactive
A thread is an independent path of execution within a
program, executing concurrently.
Multithreaded means handling multiple tasks simultaneously
or executing multiple portions (functions) of the same
program in parallel.
The code of java is divided into smaller parts and Java
executes them in a sequential and timely manner.
Advantages:
Maximum utilization of resources is possible.
It doesn’t occupy memory for each thread. It shares a
common memory area.
There is no need to wait for the application to finish one
task before beginning another one.
There is a decreased cost of maintenance. Also, It is time-
saving.
It improves the performance of complex applications.
Prathibha Virtual Classes
20. Java is interactive because its code supports effective CUI
(Character User Interface) and GUI (Graphical User
Interface) programs.
It greatly improves the interactive performance of graphical
applications.Prathibha Virtual Classes
21. Conclusion
In this lesson you learnt about
What is Java?
Tools needed for Java
Java Features
Future Topics
OOPS Concepts
Prathibha Virtual Classes