Introduction to Java
--To understand java first of all we introduce OOP, oop means Object Oriented Programming,
so why OOP is introduced?
In earlier programming approaches there are certain limitations to overcome that limitation, programming introduced the new programming approach that is said to be oop.
@ the problem in Procedural Languages?
1)procedural codes are very difficult to maintain if the code is larger.
2)The data, Which is used in procedural languages are exposed to the whole program. So, there is no security for the data.
3) Procedural language is difficult to relate to real-world objects.
4)Creating new data types is a feature called Extensibility, but procedural languages are Not Extensible.
5)Procedural language does not java automatic memory management.
Object Oriented Modeling
1)Objected Oriented Programming is the term used to describe a programming approach based on objects and classes.
2) The fundamental idea behind object-oriented language is to combine both, data and the function that operates on that data into a single unit and such a unit is called an object. and class is a blueprint of the object.
in the above information, we introduced OOP because java is an Object-Oriented language most work is done in java on the basis of the OBJECT and CLASSES.
==now we go on Java==
In 1995, James A. Gosling was introduced to the language of java hence him Called as Father of java.
It is developed by Sun Microsystems. (James Gosling)
Initially called "Oak" but was renamed "java", because there was already a language called Oak.
Initially, the motivation is to develop a platform-independent language(Write Once, Run Anywhere (WORA).
java plays to the strengths of the internet.
INTRODUCTION OF JAVA
1) Java is an oop language with a built-in application programming interface(API).
2) It can handle graphical user interfaces(GUI) used to create applications or applets.
3)java does not support the pointer like c++ and c.
4)Java force user to write object-oriented code and procedure code is embedded in objects.
4) Applications are programs that perform functions similar to those written in other programming languages.
5) Java is the first programming language that provides the concept of writing programs that can be executed using the web.
6)Applets are programs that are meant to be embedded in a web page and downloaded over the Internet.
WHERE IS JAVA USED??
a)Desktop Applications-- Acrobat reader, Media player, Antiviruses etc.
b) Web Application.
c) Enterprise Application- Banking Application, Business Application.
d) Mobile.
e) Embedded System.
f)Games.
g) Robotics.
JAVA FEATURE
1) Java is Simple.
because the coding style is very clean and easy to understand. it removes complexity because it doesn't use complex and difficult features of another language like C C++, which are as follows:
a) concept of Explicit Pointers.
b)Storage classes.
c) Pre-processors and header files
d)Multiple inheritance
e) Operator Overloading
2)Java is OBJECT -ORIENTED LANGUAGE
a) java supports major Object-Oriented programming features like Encapsulation, Abstraction, Polymorphism and Inheritance.
3)Java is PLATFORM INDEPENDENT
a) platform-independent means a program complied on one machine can be executed on any machine in the world without any change.
b) java archives platform independence by using the concept of the BYTE CODE.
c)Java compiler never converts the source code to machine code like that of the c/c++ compiler.
d) Instead, it converts the source code into intermediate code called the byte code and this byte code is further translated to machine-dependent form by another layer of software called JVM( java virtual Machine).
e) Therefore, JVM can execute byte code on any platform or OS on which it is present, regardless of the fact on which machine the byte code was generated.
f) slogan of the java is
"Write Once, run anywhere"(WORA).
4)Java is DISTRIBUTED LANGUAGE.
a) Java is distributed because it encourages users to create
applications that can be distributed over the network.
5)Java is ROBUST LANGUAGE.
A) Robust means Strong. because
!) java uses strong memory management.
!!)It is capable of handling run-time errors.
!!!) There is a lack of a pointer that avoids security problems.
!v) There is automatic garbage collection in java.
v) There is exception handling and type-checking mechanism in java.
All this makes java Robust.
6)Java is a SECURE LANGUAGE.
!) Java Supports access modifiers to check memory access and also ensures that no viruses enter an applet.
7)Java is PORTABLE.
a)We carry the java bytecode to any platform.
8)Java is MULTI-THREADED AND INTERACTIVE.
!) The code of java is divided into smaller parts and java executes them in a sequential and timely manner.
ADVANTAGES:
a) The main advantage of multithreading is that the maximum utilization of resources is possible.
b)It doesn't occupy memory for each thread. It shares a common area.
c) there is no need to wot for the application to finish one task before beginning another one.
d) It improves the performance of complex applications.
9) AUTOMATIC-MEMORY MANAGEMENT
!) in java, memory management is the process of allocation and de-allocation of objects, called Memory management.
!!) Java does memory management automatically.
!!!) Java uses an automatic memory management system called a garbage collector.
10) DYNAMIC AND EXTENSIBLE.
a) 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.
\===============================================
above the 10 features of java an the introduction of java.
also
taking something about JDK, JRE, JVM
1) Java development kit(JDK)
for making java programs, we need some tools that are provided by JDK.
JDK contains different tools by using these tools we can perform different operations such as compilation, execution, documentation, debugging, etc
2) Java Runtime Environment (JRE)
To execute the java program we need an environment. (Java Runtime Environment )
the JRE consists of java virtual machine, java libraries and all other components necessary to Run java applications & applets.
3) Java virtual machine(JVM).
JVM is a part of JRE that executes the java program at the end. Actually, it is part of JRE, but it is softwere that converts bytecode into machine-executable code to execute on hardware.
This is all about java.
THIS IS MY FIRST BLOG ON THE JAVA IN HASHNODE
THANK YOU.
