0% found this document useful (0 votes)
24 views

1.core Java Introduction

Introduction to Core Java. Notes prepared by madhusudhan

Uploaded by

ms.madhu27
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

1.core Java Introduction

Introduction to Core Java. Notes prepared by madhusudhan

Uploaded by

ms.madhu27
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Leela Soft Core Java (J2SE) Madhusudhan

Java: Java Full Stack


1. Core Java
2. Advanced Java
a. JDBC
b. Servlets
c. JSP
3. Spring Framework
4. Spring Boot
5. Hibernate

MEAN Stack:
• MongoDB
• Express.js
• Angular JS
• Node JS

MERN Stack:
• MongoDB
• Express.js
• React JS
• Node JS

Front End:
• HTML
• CSS
• JavaScript

Database:
1. SQL
2. Advanced SQL

Big Data, Python, R Lang, Excel, Tabula


• Data Scientist
• Data Engineer
• Data Analyst

Java Editions
1. J2SE / JSE (Java2 Standard Edition)
2. J2EE / JEE (Java2 Enterprise Edition)
3. J2ME / JME (Java2 Mobile/Micro Edition)

[email protected] Cell: 78 42 66 47 66
Leela Soft Core Java (J2SE) Madhusudhan
The Java Programming Language Platforms
There are four platforms of the Java programming language:
• Java Platform, Standard Edition (Java SE)
• Java Platform, Enterprise Edition (Java EE)
• Java Platform, Micro Edition (Java ME)
• JavaFX

Java SE
When most people think of the Java programming language, they think of the Java SE API.

Java SE's API provides the core functionality of the Java programming language.

It defines everything from the basic types and objects of the Java programming language to
high-level classes that are used for networking, security, database access, graphical user
interface (GUI) development, and XML parsing.

In addition to the core API, the Java SE platform consists of a Virtual Machine, development
tools, deployment technologies, and other class libraries and toolkits commonly used in Java
technology applications.

API (Application Programming Interface):


An API is a collection of software components that we can use to create other software
components or applications.

Java EE
The Java EE platform is built on top of the Java SE platform. The Java EE platform provides an API
and runtime environment for developing and running large-scale, multi-tiered, scalable,
reliable, and secure network applications.

Java ME
The Java ME platform provides an API and a small-footprint virtual machine for running Java
programming language applications on small devices, like mobile phones. The API is a subset of
the Java SE API, along with special class libraries useful for small device application development.
Java ME applications are often clients of Java EE platform services.

JavaFX
JavaFX is a platform for creating rich internet applications using a lightweight user-interface API.
JavaFX applications use hardware-accelerated graphics and media engines to take advantage of
higher-performance clients and a modern look-and-feel as well as high-level APIs for connecting
to networked data sources. JavaFX applications may be clients of Java EE platform services.

[email protected] Cell: 78 42 66 47 66
Leela Soft Core Java (J2SE) Madhusudhan
Introduction to Java:
Java was originally developed by James Gosling at Sun Microsystems (which has since been
acquired by Oracle) and released in 1995 as a core component of Sun Microsystems' Java
platform.

The original and reference implementation Java compilers, virtual machines, and class libraries
were originally released by Sun under proprietary licenses.

As of May 2007, in compliance with the specifications of the Java Community Process, Sun had
relicensed most of its Java technologies under the GPL-2.0-only license.

Oracle (and others) highly recommend uninstalling outdated versions of Java because of serious
risks due to unresolved security issues. Since Java 9, 10, 12, 13, 14, and 15 are no longer
supported, Oracle advises its users to immediately transition to the latest version (currently Java
16) or an LTS release.

A Short History of Java


This section gives a short history of Java’s evolution. It is based on various published sources
(most importantly an interview with Java’s creators in the July 1995 issue of SunWorld’s online
magazine).

Java goes back to 1991, when a group of Sun engineers, led by Patrick Naughton and James
Gosling (a Sun Fellow and an all-around computer wizard), wanted to design a small computer
language that could be used for consumer devices like cable TV switchboxes. Since these devices
do not have a lot of power or memory, the language had to be small and generate very tight
code. Also, as different manufacturers may choose different central processing units (CPUs), it
was important that the language not be tied to any single architecture. The project was code-
named “Green.”

The requirements for small, tight, and platform-neutral code led the team to design a portable
language that generated intermediate code for a virtual machine.

The Sun people came from a UNIX background, so they based their language on C++ rather than
Lisp, Smalltalk, or Pascal. But, as Gosling says in the interview, “All along, the language was a
tool, not the end.” Gosling decided to call his language “Oak” (presumably because he liked the
look of an oak tree that was right outside his window at Sun). The people at Sun later realized
that Oak was the name of an existing computer language, so they changed the name to Java.
This turned out to be an inspired choice.

As datacenters increasingly relied on commodity hardware instead of specialized servers, Sun


Microsystems fell on hard times and was purchased by Oracle in 2009. Development of Java
stalled for a long time. In 2011, Oracle released a new version, with simple enhancements, as
Java 7.

[email protected] Cell: 78 42 66 47 66
Leela Soft Core Java (J2SE) Madhusudhan
In 2014, the release of Java 8 followed, with the most significant changes to the Java language in
almost two decades. Java 8 embraces a “functional” style of programming that makes it easy to
express computations that can be executed concurrently. All programming languages must
evolve to stay relevant, and Java has shown a remarkable capacity to do so.

Evolution of the Java Language


Version Year New Language Features Number of Classes
and Interfaces
1.0 1996 The language itself 211
1.1 1997 Inner classes 477
1.2 1998 The strictfp modifier 1,524
1.3 2000 None 1,840
1.4 2002 Assertions 2,723
5.0 2004 Generic classes, “for each” loop, varargs, autoboxing, 3,279
metadata, enumerations, static import
6 2006 None 3,793
7 2011 Switch with strings, diamond operator, binary literals, 4,024
exception handling enhancements
8 2014 Lambda expressions, interfaces with default methods, 4,240
stream and date/time libraries
9 2017 Modules, miscellaneous language and library 6,005
enhancements

Overview of Java
Java has emerged as the object-oriented programming language of choice. Some of the
important concepts of Java include:
• A Java virtual machine (JVM), which provides the fundamental basis for platform
independence.
• Automated storage management techniques, such as garbage collection.
• Language syntax that is similar to that of the C language.

Key Features of the Java Language


The Java language provides certain key features that make it ideal for developing server
applications. These features include:

Simplicity:
Java is simpler than most other languages that are used to create server applications, because of
its consistent enforcement of the object model. The large, standard set of class libraries brings
powerful tools to Java developers on all platforms.

Platform Independent:
Unlike many other programming languages including C and C++, when Java is compiled, it is not
compiled into platform specific machine, rather into platform-independent byte code. This byte
code is distributed over the web and interpreted by the Virtual Machine (JVM) on whichever
platform it is being run on.

[email protected] Cell: 78 42 66 47 66
Leela Soft Core Java (J2SE) Madhusudhan

Portability:
Java is portable across platforms. It is possible to write platform-dependent code in Java, and it
is also simple to write programs that move seamlessly across systems.

Architecture-neutral:
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.

Interpreted:
Java byte code is translated on the fly to native machine instructions and is not stored anywhere.
The development process is more rapid and analytical since the linking is an incremental and
light-weight process.

Dynamic:
Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving
environment. Java programs can carry an extensive amount of run-time information that can be
used to verify and resolve accesses to objects at run-time.

High Performance:
With the use of Just-In-Time compilers, Java enables high performance.

Distributed:
Java is designed for the distributed environment of the internet.

Object-Oriented Programming:
The following terms are common in Java application development:
• Classes
• Objects
• Encapsulation
• Inheritance
• Polymorphism
• Abstraction

No Pointers:
Although Java is quite similar to C in its syntax, it does not support direct pointers or pointer
manipulation. We pass all parameters, except primitive types, by reference and not by value. As
a result, the object identity is preserved. Java does not provide low level, direct access to
pointers, thereby eliminating any possibility of memory corruption and leaks.

Security:
The design of Java bytecodes and JVM specification allow for built-in mechanisms to verify the
security of Java binary code. With Java, we can develop virus-free systems.

[email protected] Cell: 78 42 66 47 66
Leela Soft Core Java (J2SE) Madhusudhan
Java is secured because:
• No explicit pointers
• Java Programs run inside a virtual machine sandbox
• Classloader: Classloader in Java is a part of the Java Runtime Environment (JRE) which is
used to load Java classes into the Java Virtual Machine dynamically. It adds security by
separating the package for the classes of the local file system from those that are
imported from network sources.
• Bytecode Verifier: It checks the code fragments for illegal code that can violate access
rights to objects.
• Security Manager: It determines what resources a class can access such as reading and
writing to the local disk.

Java language provides these securities by default. Some security can also be provided by an
application developer explicitly through SSL, JAAS, Cryptography, etc.

Static Typing:
Statically typed languages perform type checking at compile time. Statically-typed languages
require you to declare the data types of your variables before you use them.

Exception Handling:
Java exceptions are objects. Java requires developers to declare which exceptions can be thrown
by methods in any particular class.

Automatic Storage Management:


A JVM automatically performs all memory allocation and deallocation while the program is
running. Java programmers cannot explicitly allocate memory for new objects or free memory
for objects that are no longer referenced. Instead, they depend on a JVM to perform these
operations. The process of freeing memory is known as garbage collection.

Robust:
The English mining of Robust is strong. Java is robust because:
• It uses strong memory management.
• There is a lack of pointers that avoids security problems.
• Java provides automatic garbage collection which runs on the Java Virtual Machine to get
rid of objects which are not being used by a Java application anymore.
• There are exception handling and the type checking mechanism in Java. All these points
make Java robust.

Multi-threaded
A thread is like a separate program, executing concurrently. We can write Java programs that
deal with many tasks at once by defining multiple threads. The main advantage of multi-threading
is that it doesn't occupy memory for each thread. It shares a common memory area. Threads are
important for multi-media, Web applications, etc.

[email protected] Cell: 78 42 66 47 66

You might also like