2. 11/6/2022 2
• Java is one of the most popular and widely used programming language and platform. A
platform is an environment that helps to develop and run programs written in any
programming language.
• Java is fast, reliable and secure. From desktop to web applications, scientific
supercomputers to gaming consoles, cell phones to the Internet, Java is used in every
nook and corner.
Chapter 1-java evolution
3. 11/6/2022 3
• Java is easy to learn, and its syntax is simple and easy to understand. It is based on C++ (so
easier for programmers who know C++). Java has removed many confusing and rarely-used
features e.g., explicit pointers, operator overloading etc. Java also takes care of memory
management and for that, it provides an automatic garbage collector. This collects the unused
objects automatically.
7. CHAPTER-2 CLASSES AND OBJECTS
•Mobile-phone is an object because it is a real time entity,
and it has its own state, behavior and identity. Mobile-
phone are manufactured in surplus by various companies
and each of the brands have distinct features.
•Classes in java are logical entities which have methods,
fields, constructors and a lot more. In a mobile-phone,
you can consider its specifications as classes, be it
processor/battery/sensors/basic features like call, text,
record.
11/6/2022 7
8. Abstraction:
•Revealing relevant/necessary information and hiding the
unwanted information is abstraction.
•In a mobile-phone, dialing a number would call some method
internally which will concatenate the numbers and displays it on
screen but, we don’t know what is happening internally.
•When you tap on the call option, it is sending signals to another
person’s mobile(whom you are trying to call) but we are unaware
of its implementation.
•So, it is hiding the implementation and showing you the
functionality only.
Encapsulation:
•Enclosing one or more details from outside world through
access rights.
•We have Bluetooth in our mobiles to transfer data between two
mobile-phones within a limited distance.
•If I turn on Bluetooth in both mobiles, I can transfer the desired
data, but I can’t access the other mobile’s information like gallery
until and unless I get a permission from the other mobile.
9. Polymorphism:
•Performing a job in different ways.(One to many)
•We click photographs and record videos using the camera in a mobile-
phone.
•Various brands have a plethora of camera modes in a mobile like split
camera/pan aroma/slow-mo.
•The basic purpose is to click/record, so the functionality of camera is
the same in every mobile, whereas the modes enable you to use your
camera in different ways.
11/6/2022 9
Inheritance:
•One class(sub/child class) is deriving all properties from other
class.(parent class)
•The basic purpose of using a mobile-phone is communication.
•There are several brands in mobiles. So, the brands of a mobile
are using this basic functionality(communication) by extending the
mobile class functionality and adding their own new features to
their respective brands.
10. Refer the below site for more concepts:
https://medium.com/front-end-weekly/es6-lets-divide-our-phones-into-
classes-4574bd0454bf
11. 11/6/2022 11
PACKAGES:
Package in Java is a mechanism to encapsulate a group of classes, sub packages and
interfaces
Chapter-3 packages and interfaces
13. 11/6/2022 13
INTERFACE:
An Interface is a group of abstract methods and constants. An Interface
may contain constants, static methods, default methods, and nested
types. Default and static methods have their body in an interface. An
Interface cannot be instantiated
interface Wifi {
void connect();
void disconnect();
}
class Mobile implements Wifi {
public void connect() {
System.out.println("Wifi connected"); }
public void disconnect() {
System.out.println("Wifi disconnected");}
public static void main(String args[]) {
Mobile mobile = new Mobile();
mobile.connect();
mobile.disconnect(); }} //Output
//Wifi connected
///Wifi disconnected
14. Java collections refer to a collection of individual objects
that are represented as a single unit. You can perform all
operations such as searching, sorting, insertion,
manipulation, deletion, etc., on Java collections just like
you do it on data.
CHAPTER-4 THE COLLECTION FRAMEWORK
11/6/2022 14
A Java collection framework provides an
architecture to store and manipulate a group of
objects. A Java collection framework includes the
following:
• Interfaces
• Classes
• Algorithm
16. chapter-5 MULTITHREADING
• Multithreading is a Java feature that allows concurrent execution of two or more parts
of a program for maximum utilization of CPU. Each part of such program is called a
thread. So, threads are light-weight processes within a process
11/6/2022 16
Accessing multiple tabs using multithreading
17. 11/6/2022 17
• JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and
execute the query with the database. It is a part of Java SE (Java Standard Edition).
JDBC API uses JDBC drivers to connect with the database.
Chapter-6 JDBC
18. 11/6/2022 18
Transaction management [1, 2] refers to the tasks of processing multiple transactions issued by
various clients of a database server in such a way that the ACID contract can be fulfilled, that is,
the properties of atomicity, consistency preservation, isolation, and durability of each individual
transaction can be guaranteed. Transaction management is generally understood as requiring
serializability-based concurrency control as well as recovery from failures.
Paypal uses JAVA for writing application and
transaction management