0% found this document useful (0 votes)
7 views98 pages

Inventory File Java

The document is a project report on an Inventory Management System developed in Core Java, submitted as part of a six-month industrial training at Pro-Ace InfoTech Company. It includes acknowledgments, a company profile, and an index of topics covered in the project, showcasing the training and skills acquired during the internship. The report emphasizes the importance of industrial training for students in engineering and management fields, detailing the services and training modules offered by Pro-Ace InfoTech.

Uploaded by

artistlosscee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views98 pages

Inventory File Java

The document is a project report on an Inventory Management System developed in Core Java, submitted as part of a six-month industrial training at Pro-Ace InfoTech Company. It includes acknowledgments, a company profile, and an index of topics covered in the project, showcasing the training and skills acquired during the internship. The report emphasizes the importance of industrial training for students in engineering and management fields, detailing the services and training modules offered by Pro-Ace InfoTech.

Uploaded by

artistlosscee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 98

Project Report

On

Inventory Management System


(Core JAVA)

SUBMITTED IN PARTIAL FULFILLMENT OF THE


REQUIREMENT FOR

Six Months Industrial training


At
Pro-Ace InfoTech Company, Patiala (from 1st August-)

UNDER THE GUIDANCE: SUBMITTED BY:


Er.Divya Goyal
B.Tech 7th Sem.
Roll No:

BHAI GURDAS INSTITUTE OF ENGINEERING AND


TECHNOLOGY
CERTIFICATE

TO WHOM IT MAY CONCERN

I hereby certify that “STUDENT NAME” Roll No. ……… of BHAI GURDAS
INSTITUTE OF ENGINEERING AND TECHNOLOGY has undergone six months
industrial training from 1st August to ………. our organization to fulfill the requirements
for the award of degree of B.Tech.(7th Sem). He works on ‘Project Name’ project
during the training under the supervision of Er. Divya Goyal.
During his tenure with us we found him/her sincere and hardworking. Wishing him a
great success in the future.

Signature of the Student Signature of the SUPERVISOR (S)


(Seal of Organization)

Er.Divya Goyal
ACKNOWLEDGEMENT

The authors are highly grateful to the Director Tanuja Srivastava, BHAI GURDAS
INSTITUTE OF ENGINEERING AND TECHNOLOGY, for providing this opportunity to
carry out the six months industrial training at Pro-Ace InfoTech Company, Patiala

The constant guidance and encouragement received from Mr.


(Class Incharge) and Mr……………(HOD), BHAI GURDAS INSTITUTE OF
ENGINEERING AND TECHNOLOGY, has been of great help in carrying out the project
work and is acknowledged with reverential thanks. The authors would like to express a
deep sense of gratitude and thanks profusely to Er.Manpreet Sharma Director/CEO of
Company.

Without the wise counsel and able guidance, it would have been impossible to complete
the report in this manner. The help rendered by Er.Divya Goyal, Supervisor
Trainer for experimentation is greatly acknowledged.

The authors express gratitude to other faculty members of BHAI GURDAS INSTITUTE OF
ENGINEERING AND TECHNOLOGY, for their intellectual support throughout the course
of this work.

Student Name
(University Roll No.)
INDEX

Sr.No. Topic Name Remarks


1. Company Profile
2. Introduction to Java

3. History

4. Advantages

5. Features

6. Role of Java

7. Applications of Java

8. Scope

9. Versions of Java

10. Datatypes of Java

11. Java Character Set

12. Tokens used in Java

13. Basic syntax to write Java program

14. Type Casting

15. Packages used to take input from user

16. How to take input from user with program

17. Operators in Java

18. Flowchart of Compilation and Interpretation

19. Statements and its types

20. Difference between Break and Continue


21. Buffered Reader

22. ParseInt

23. Array

24. Class and Object

25. Functions and its types

26. How to use functions in a class

27. Garbage Collection

28. Finalize Method

29. Call by Value

30. Recursion

31. What is JDBC?

32. Differentiate between Get Text and Get Text

33. Use of forName, getConnection, prepareStatement


function
34. Driver Manager

35. NetBeans

36. Wamp Server

37. How Insertion and Selection done in Javaform in


NetBeans
38. How Deletion and Updation done in Javaform in
NetBeans
39. System Requirement Specifications

40. Introduction to Project: Library Management


System
41. Nature of Library Management System
42. Scope of Library Management System

43. Database Dataflow diagram

44. Database Screenshots

45. Database Entries Screenshots

46. PROJECT Screenshots

47. Future Work

48. Bibliography
COMPANY PROFILE

PRO-ACE INFOTECH is an ISO 9001:2008 certified organization which has been working
in the field of IT, Embedded System Engineering since last 12 years and has been providing
its clients with exceptional quality in Web Designing, Web Development and SEO services.
We also provide the offshore companies of Australia, US and UK with quality services in the
field of Android Application Development, Embedded Systems, Web Design, Web
Development (PHP), SEO, JAVA

Apart from this, PRO-ACE INFOTECH is a renowned Engineer Training organization,


well known for providing quality education in advance fields such as PHP, J2EE,
EMBEDDED SYSTEMS, AUTOMATION, VLSI, NETWORING, AutoCAD, PRO-E,
CATIA, SOLID WORKS, REVIT, ANSYS.

SE Division of the company is running under the name SPEAKSOFT. It is a unit of PRO-
ACE INFOTECH, committed to provide grooming ground to the budding professionals to
grab key positions in the esteemed organizations. Our solutions are aligned with the client’s
requirements keeping in focus the demands of the organizations. Our team is highly
qualified; specialists facilitate the learning and development of new and existing skills in
order to enhance the growth potential of students with respect to English Language and Soft
Skills Training.
COMPANY OVERVIEW
PRO-ACE INFOTECH is an ISO 9001:2008 certified organization established in 2010 which
has been working in the field of information technology since last 12 years and has been
providing its clients with exceptional quality in Web Designing, Web Development and SEO
services.

Type : Privately Held

Company Size : 20

Website : http://www.proaceinfotech.org

Industry Type : IT Development and

Professional Training Company

Year of Inception : 2010

Opposite ICICI Bank, Lela Bhawan Market,

Corporate Office : Patiala-147001, Punjab

Our Services: Our Clients:


 Web Development  Indian Industries
 Web Designing  Indian Colleges/Universities
 SEO
TECHNOLOGY EXPERTISE

Java Technologies
J2EE, EJB, JSP, J2ME, Servlet, SOAP, Web Services, XML, STRUTS, Spring, Hibernate,
Tapestry

Microsoft Technologies
.NET Framework, ASP.NET, VB.NET, C#.NET, Web Services, SQL Services, Dot NET
Nuke (DNN)

Databases
Oracle 10g, Microsoft SQL Server, Db2, MySQL

PHP Technologies
PHP, JavaScript, Joomla, CakePHP, Drupal, Magneto, Ruby on Rails, MySQL

Data Warehousing / Business Intelligence


Business objects, Cognos, Informatics, Data Stage, Decision Support System (DSS)

Operating System
Window 7, Window 8, XP, Red Hat Linux, Solaris

Mobile Technologies
MS Window Mobile, J2ME, Windows CE, Symbian, iPhone, Google Android

Its Product Range:


 Job Portal
 Online Shopping
 Security Systems
 Bulk SMS
Its Services:
 Web Development
 Web Designing
 iPhone Application Development
 Android Application Development
 2D & 3D Designing

Its Clients:
 Indian Industries
 Indian Colleges/Universities
 Offshore Clients

Its Divisions:
 Development Division
 Design Division
 Learning Division
 HR Division

Its training strengths:


 Extensive Industry expertise
 Latest and evolving program offerings
 Practical work based training modules
 On the job corporate environment
 Overall Development

VALUES AND HOW IT LIVE UPTO THEM:


 Dynamism: Proactive, Enthusiastic, Cutting Edge
 Sustainability: Long term Focus, Balanced approach, Quality consciousness
 Collaboration: Trust, Transparency, Meaningful Partnership

PRO-ACE INFOTECH is a 12 years young organization who is actively involved in the IT


field, Embedded Systems and has been providing its clients with exceptional quality in Web
Designing, Web Development and SEO services. Our clients range from small, medium to
large scale Business houses & individuals.
PRO-ACE INFOTECH AT A GLANCE

Development Division
PRO-ACE INFOTECH is a 12 years young organization with an ISO Certification which
has been working in the field of IT, Embedded System Engineering and has been providing
its clients with exceptional quality in Web Designing, Web Development and SEO services.
This company also provide the offshore companies of Australia, US and UK. It is an
association which is functioning in the field of Android Application Development,
Embedded Systems, Web Design, Web Development - PHP, SEO, JAVA.

Learning Division
Learning Division of PRO-ACE INFOTECH is a renowned Engineer Training Division, well
known for providing technical and professional skill training to individuals, organizations
and educational institutions in advance fields such as PHP, J2EE, EMBEDDED SYSTEMS,
AutoCAD. Currently these are the largest job-providing sectors. We provide high end
training with comprehensive programs that integrate all aspects required to excel at the
corporate level. With a combination of vast industry experience, cutting-edge infrastructure,
evolving technological tools and a thorough corporate culture, it function to transform an
individual into a success story.

Se Division (Speaksoft)

SE Division of the company is running under the name SPEAKSOFT. It is a unit of PRO-
ACE INFOTECH, committed to provide grooming ground to the budding professionals to
grab key positions in the esteemed organizations. Its solutions are aligned with the client’s
requirements keeping in focus the demands of the organizations. Its team is highly qualified;
specialists facilitate the learning and development of new and existing skills in order to
enhance the growth potential of students with respect to English Language and Soft Skills
Training. The company partner with us to create and realize our visions and add
tangible value to the students.

Most employers these days want to hire, retain and promote people who are dependable,
resourceful, ethical, and self-directed, have effective communication, are willing to work and

learn and have a positive attitude. The Indian market is also becoming global, so the
attributes of soft skills become imperative to be imbibed by the youth to show their real
potential at intra and international levels.

SPEAKSOFT has designed Skill Enhancement Program for addressing these needs of the
students who are pursuing technical and professional courses. The company have divided the
Skill Enhancement Program under three main heads according to the requirement of the
clients.

SALIENT FEATURES @ PRO-ACE INFOTECH


PRO-ACE INFOTECH has been the prime institution in the field of Training & Education in
Patiala. With over 1000 students undergoing training every year in field of IT, Electronics
and Management fields, the organization have proven our worth. Only quality can withstand
the test of time in today’s highly demanding market and with professionals hired to provide
training to the student, PRO-ACE aim to give the real industry environment to the student so
that they get ready for it.
INDUSTRIAL TRAINING IN PATIALA
Industrial Training is very important in Career shaping of Students in Engineering and
Management Stream (Either in B.Tech, Diploma, MCA, MBA and BBA). PRO-
ACEINFOTECH is providing both six weeks and six months Industrial Training.
Placement companies mostly look for the latest technologies used in market. Industrial
training is best place to master skills as needed by companies. Depending on student’s
personal interest or according to his/her strength. Students from various Engineering and
Management colleges and universities undergo training with us. During this period students
have to decide field & technology that would help them find right path for their career and
get them great job & placement.

Training Modules @ Pro-Ace Infotech

6 Week/ 6 Months Industrial Training Is Available In



MANAGEMENT : HUMAN RESOURCE, FINANCE, MARKETING

SOFTWARE DEVOLPMENT : PHP, JAVA, ASP.NET, ANDROID ,NETWORKING

ELECTRONICS & ELECTRICAL: EMBEDDED SYSTEM, PLC

MECHANICAL & CIVIL: Auto-CAD, Pro/ENGINEER, 2D &3D MAX
LEVELS OF TRAINING

LEVEL 1 CONCEPTUAL TRAINING

LEVEL 2 ADVANCED TRAINING

LEVEL 3 PROJECT WORK

LEVEL 4 REPORT WRITING

Skill Enhancement Program


Technical and job-related skills are a must, but they are not sufficient when it comes to
progressing up the ladder. Research in many fields such as Sales and Marketing, Software
development, Engineering and law, has shown that to be successful in the workplace,
knowledge alone is not enough. Soft skills are needed to deal with the external world and to
work in a collaborative manner with one’s colleagues. Good soft skills ensure that the
companies are able to capitalize on the wealth of technical knowledge, experience and
efficiency to rule markets. To cater this need PRO-ACE InfoTech has designed an extensive
Personality and Image Building Program. In which the organization prepare people for the
Interviews and other Behavioral skills required for the Industry and outer world. In this
program pro-ace InfoTech provide

 Personality development
 Image building
 Interview skills
 Business writing
 Time management
 Mental aptitude
Brief description of the Skill Enhancement Program

LEVEL 1 LEVEL 2

“ASPIRING HIGH” “NURTURING DREAMS”

Initial Learning Module Advanced Learning Module

On On

Skill Enhancement Program Skill Enhancement Program

Aspiring High
Be better equipped to set the sails ‘right’ in the direction of the opportune wind! We all
aspire high to reach our goals which we have set in for ourselves. We all have dreams
and want to achieve our goals. So, what are you waiting for set your seat belts tight and
set in on a journey with us where all your dreams will come true. Let’s collectively work
to bridge the gap between your aspirations and reality. We at PRO-ACE, render our
services to develop corporate solutions that ‘work’ towards strengthening the brand
value and identity.

Nurturing Dreams
The world is turning into a global village and competition is increasing manifolds. There
are many pre-requisites which have to be analyzed and given due consideration to
become successful and reach the goals. At Pro – Ace offer a solution to all the problems
which the students encounter. Pro – Ace has explored all the major issues which become
a hindrance in the student’s career. The organisation have designed our program
“NUTURING DREAMS” which covers all the essential aspects which are required for
cracking the placement process of any company.
Objectives of The Program

Help students understand the benefits of Personality enhancement and Image
Building.

To improve the communication of the students and guide them to organize and
express their ideas effectively.

To comprehend the Pronunciation and understand the standard EnglishTo confidently speak
in front of all and remove the fear of judgment

To acquaint the students with business and professional writing

To build the aptitude skills of students

Enhance logical reasoning

Course Outcomes

Students will be able to handle situations confidently

They will not feel hesitant while using the International language i.e. English

It will boost the morale of the students

Students will become good communicators, self-motivated and ambitious

Have a clear vision and overcome obstacles

Methodology

Open Discussions Individually and in groups

Group activities

Games and relevant activities

Power point presentations

Perception tasks

Its Core Competency


At PRO-ACE INFOTECH, core competence and Industry experience has allowed us to
expand its service domain to offer a wide array of services across multiple verticals. The
organization believe in working closely with the industry and the same is reflected in our tie-
ups with some of the most prestigious Industries, Institutions and experts from across the
world for offering practical & professional hands on trainings in IT, Electronics &
Communication and Management Sector. In a market that is saturated by IT training
providers, PRO-ACE INFOTECH brings fresh verve, energy, innovation and a commitment
to quality education that is unparalleled. Its objective to venture into training and education
stems from its years of industry experience coupled with extensive research and analysis of
various trends which are and were affecting IT training quality in the count.
 Introduction to Java
Java is a class-based object-oriented simple programming language. Though we can not
consider it to be fully object-oriented as it supports primitive datatypes. It is a general-
purpose, high-level programming language that helps programmers and developers to write a
code once and run it anywhere.

Java is a high-level, object-oriented programming language that was developed by Sun


Microsystems (now owned by Oracle Corporation) in the mid-1990s. It is known for its
simplicity, portability, and robustness, and is widely used for building a variety of
applications, including web, desktop, mobile, and enterprise software.

One of Java's key features is its "write once, run anywhere" principle, which means that Java
programs can run on any device or operating system that has a Java Virtual Machine (JVM)
installed. This platform independence is achieved by compiling Java source code into
bytecode, which can then be executed by the JVM.

Java is an object-oriented language, which means it supports the concepts of classes and
objects. It provides a rich set of features for object-oriented programming, such as
inheritance, encapsulation, and polymorphism. This allows developers to create modular and
reusable code, making it easier to build and maintain complex applications.
Furthermore, Java has a vast standard library that provides a wide range of classes and
methods for common programming tasks, such as input/output operations, networking, and
database connectivity. Additionally, there is a thriving ecosystem of third-party libraries and
frameworks that further enhance Java's capabilities and make development more efficient.

 History

 Java's history dates back to the early 1990s when a team of developers at Sun
Microsystems, led by James Gosling, started working on a project called "Green." The
goal of the project was to develop a language that could be used to program consumer
electronics, such as set-top boxes.
 Initially, the team developed a language called Oak, which was later renamed Java due to
trademark conflicts. The name "Java" was inspired by the coffee consumption habits of
the development team. The language was designed to be simple, portable, and secure,
with built-in support for networking and distributed computing.
 In 1995, Sun Microsystems officially released Java to the public. The release included the
Java Development Kit (JDK) 1.0, which consisted of the Java compiler, the Java Virtual
Machine (JVM), and a set of libraries. Java's key feature, the "write once, run anywhere"
principle, was made possible by the JVM, which could execute bytecode on any platform.
 Java gained popularity quickly, particularly in the realm of web development. Applets,
which were small Java programs embedded in webpages, allowed for interactive and
dynamic content on the early web. However, as the web evolved, the usage of Java
applets declined due to security concerns and the emergence of alternative technologies.
 In the late 1990s, Java began to gain significant traction in enterprise software
development. Its object-oriented nature, extensive libraries, and platform independence
made it an ideal choice for building large-scale applications. The Java 2 Platform,
Standard Edition (J2SE), introduced in 1998, brought important updates and
improvements to the language.
 In 2006, Sun Microsystems released Java as an open-source project under the GNU
General Public License (GPL). This move helped to further expand Java's reach and
fostered a strong community around the language. Oracle Corporation acquired Sun
Microsystems in 2010 and became the custodian of Java.
 Java's popularity has remained strong, and it has maintained its position as one of the
most widely used programming languages. It has found applications in various domains,
including web development, mobile app development (particularly for Android),
enterprise software development, scientific computing, and more.
 Advantages

1. Simple
Java is a simple programming language since it is easy to learn and easy to understand. Its
syntax is based on C++, and it uses automatic garbage collection; therefore, we don't need to
remove the unreferenced objects from memory. Java has also removed the features like
explicit pointers, operator overloading, etc., making it easy to read and write.

2. Object-Oriented
Java uses an object-oriented paradigm, which makes it more practical. Everything in Java is
an object which takes care of both data and behavior. Java uses object-oriented concepts like
object, class, inheritance, encapsulation, polymorphism, and abstraction.

3. Secured
Java is a secured programming language because it doesn't use Explicit pointers. Also, Java
programs run inside the virtual machine sandbox. JRE also provides a classloader, which is
used to load the class into JVM dynamically. It separates the class packages of the local file
system from the ones that are being imported from the network.

4. Robust
Java is a robust programming language since it uses strong memory management. We can
also handle exceptions through the Java code. Also, we can use type checking to make our
code more secure. It doesn't provide explicit pointers so that the programmer cannot access
the memory directly from the code.

5. Platform independent
Java code can run on multiple platforms directly, I.e., we need not compile it every time. It is
right once, runs anywhere language (WORA) which can be converted into byte code at the
compile time. The byte code is a platform-independent code that can run on multiple
platforms.

6. Multi-Threaded
Java uses a multi-threaded environment in which a bigger task can be converted into various
threads and run separately. The main advantage of multi-threading is that we need not
provide memory to every running thread.

7. Rich Standard Library


Java provides a comprehensive standard library, known as the Java Development Kit (JDK),
which offers a wide range of pre-built classes and methods for common programming tasks.
This saves developers time and effort by providing ready-to-use functionality for tasks like
input/output operations, networking, database connectivity, and more.

8. Performance and Scalability


While Java is often criticized for its performance compared to low-level languages like C or
C++, it offers high performance in terms of execution speed and efficiency compared to
many other high-level languages. Additionally, Java's scalability makes it suitable for
building large-scale, enterprise-level applications that can handle heavy loads and concurrent
operations.
 Features

1. Object Oriented:
In Java, everything is an Object. Java can be easily extended since it is based on the
Object model.

2. Simple:
Java is designed to be easy to learn. If you understand the basic concept of OOP Java, it
would be easy to master.

3. Secure:
With Java's secure feature it enables to develop virus-free, tamper-free systems.
Authentication techniques are based on public-key encryption.

4. 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.

5. Robust:
Java makes an effort to eliminate error-prone situations by emphasizing mainly on
compile time error checking and runtime checking.

6. Portable:
Being architecture-neutral and having no implementation dependent aspects of the
specification makes Java portable. The compiler in Java is written in ANSI C with a
clean portability boundary, which is a POSIX subset.

7. 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.

8. 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.

9. 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.

10. High Performance:


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

11. Multithreaded:
With Java's multithreaded feature it is possible to write programs that can perform many
tasks simultaneously. This design feature allows the developers to construct interactive
applications that can run smoothly.

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

 Role of Java
Java plays a significant role in various domains and has become a fundamental
technology in the software development industry. Here are some key roles that Java
fulfills:

 Video games:
When it comes to game development, programming languages such as C# and C++ are
employed by game engines such as Unity and Unreal Engine. Java, on the other hand, is
a great choice if you want to study graphics and game development from the ground up.
There are numerous frameworks and libraries available, such as LibGDX and OpenGL.

 Web-based programmes:
Java is a well-known server-side programming language that is often used for
constructing web applications. Spring, Struts, Hibernate, Apache Hadoop, and JSF are
among of the most popular Java frameworks for constructing Web applications. Java is
also used by famous websites such as LinkedIn, AliExpress, Amazon, and many others.

 Big data:
Aside from Python, which is used in Big Data, there are many other popular
programming languages. Even so, when it comes to Big Data Technology, most
programmers prefer Java. The reason for this is that most famous Big Data tools, such as
Hadoop and Deeplearning4j, use Java and its community support is excellent when it
comes to Big Data Technology.

 Internet of Things (IoT) :


Developers often regard Java as the best language for IoT device development. There
are several factors behind this: primarily, it is a programming language that is platform
agnostic. As a result, you only have to create your code once, and it will operate on a
variety of devices, reducing your overall workload.
It’s also the best choice for IoT because of its adaptability and mobility, as it’s used for
web development, Android development, desktop app development, and a variety of
other things. Compared to other programming languages, integrating multiple
technologies is easier with Java. For these reasons, is employed in automotive
navigation systems, various medical gadgets, and embedded electronics.

 Android apps:
Java is the official programming language for Android development, with Java
accounting for 46.2 percent of all Android applications. It’s used by Android Studio,
which is the official IDE for developing Android apps. So, if you are familiar with the
Java programming language, Android development will be considerably easier for you.

 Desktop applications:
Java is also well-known for creating graphical user interfaces for desktop applications.
There are numerous Java Frameworks available, making GUI Application Development
a breeze. Swing, AWT, JavaFX, Griffon, and many others are among them. So, if you’re
planning to create a desktop application, Java is a great option for you.

 Applications of Java

1. Mobile App Development:


The Java programming language can be considered as the official language for mobile
application development. Most of the android applications build using Java. The most
popular android app development IDE Android Studio also uses Java for developing
android applications. So, if you are already familiar with Java, it will become much easier
to develop android applications. The most popular android applications Spotify and
Twitter are developed using Java.

2. Desktop GUI Applications:


We can also develop a GUI application using Java. Java provides AWT, JavaFX, and
Swing for developing the GUI based desktop application. The tools contain the pre-
assembled components like list, menu, button.

3. Web-based Applications:
It is also used for developing the web-based application because it provides vast support
for web development through Servlet, JSP, and Struts. It is the reason that Java is also
known as a server-side programming language. Using these technologies, we can develop
a variety of applications. The most popular frameworks Spring, Hibernate, Spring Boot,
used for developing web-based applications. LinkedIn, AliExpress, web.archive.org,
IRCTC, etc. are the popular websites that are written using Java programming language.
4. Game Development:
Java is widely used by game development companies because it has the support of the
open-source most powerful 3D engine. The engine provides unparalleled capacity when it
comes to the context of the designing of 3D games. The most popular games developed in
Java are Minecraft, Mission Impossible III, etc. There are some popular Frameworks and
Libraries available for Game Development, like - LibGDX and OpenGL.

5. Big Data Technology:


As many programming languages are available for Big Data Technology but still Java is
the first choice for the same. The tool Hadoop HDFS platform for processing and storing
big data applications is written in Java. In big data, Java is widely used in ETL
applications such as Apache Camel and Apache Kafka. It is used to extract and transform
data, and load in big data environments.

6. Distributed Applications:
The JINI (Java Intelligent Networking Infrastructure) provides the infrastructure to
register and find distributed services based on its specification. It implements a
mechanism that is known as JavaSpaces. It supports the distribution, persistence, and
migration of objects in a network.

7. Cloud-Based Applications:
A cloud application is the on-demand availability of IT resources via the internet. The
cloud-based application provides the service at a low cost. Java provides the environment
to develop cloud-based applications. We can use Java to develop SaaS (Software as a
Service), LaaS (Logging as a Service), and PaaS (Platform as a Service). The cloud
application widely used to share data between companies or to develop applications
remotely.

8. IoT Application:
IoT is a technology that connects the devices in its network and communicates with them.
IoT has found almost in all the small devices such as health gears, smartphones,
wearables, smart lighting, TVs, etc. For developing the IoT application there is a lot of
programming languages that can be used but Java offers an edge to developers that is
unparalleled. IoT programmers gravitate towards Java because of its security, flexibility,
and versatility.

 Scope

The scope of Java remains strong and promising in the software development industry. Here
are some key factors that contribute to the continued scope and relevance of Java:

1. Wide Adoption:
Java is one of the most widely adopted programming languages in the world. It has a
vast and active developer community, which ensures a steady supply of resources,
frameworks, libraries, and tools. The extensive adoption of Java ensures a high demand
for Java developers and opportunities for career growth.

2. Enterprise Applications:
Java has a strong foothold in the development of enterprise-level applications. Its
scalability, robustness, and support for distributed computing make it an ideal choice
for building large-scale, mission-critical software systems. The need for enterprise
applications is likely to persist, ensuring a steady demand for Java developers with
enterprise development skills.

3. Android Development:
Java is the primary programming language for Android app development. Android has
a massive market share in the mobile industry, and Java remains essential for building
Android applications. As mobile app usage continues to grow, the demand for skilled
Java developers in the Android ecosystem will remain significant.

4. Big Data and Analytics:


Java is widely used in big data processing and analytics frameworks such as Apache
Hadoop and Apache Spark. With the exponential growth of data and the increasing
need for data analysis, the demand for Java developers with expertise in big data
technologies is expected to rise.

5. Internet of Things (IoT):


Java's platform independence and support for embedded systems make it suitable for
IoT development. As the IoT industry continues to expand and connect more devices,
the demand for Java developers who can build IoT applications and integrate them with
various platforms and devices is expected to increase.

6. Cloud Computing:
Java is extensively used in cloud computing platforms and technologies. Many cloud-
based services, including serverless computing, containerization, and microservices
architectures, rely on Java. As more organizations adopt cloud technologies, the
demand for Java developers with cloud computing skills is likely to grow.

7. Machine Learning and AI:


Java is increasingly being used in the field of machine learning and artificial
intelligence. Libraries like Deeplearning4j and DL4J provide Java interfaces for
building and training machine learning models. As AI technologies continue to evolve
and find applications in various industries, the need for Java developers who can work
with AI frameworks is expected to rise.
8. Continued Updates and Support:
Java has a history of regular updates and releases, ensuring that the language remains
modern, secure, and aligned with industry needs. The commitment of Oracle
Corporation and the active Java community to improving the language and expanding
its capabilities contribute to its continued scope and relevance.

While technology landscapes evolve, Java's versatility, platform independence, performance,


and extensive ecosystem make it well-positioned to adapt and continue to thrive. By staying
updated with emerging technologies and frameworks, Java developers can leverage the
language's strengths and explore new opportunities across various domains.

 Versions of Java

Java had several major versions, each with its own set of features and improvements. Here
are some of the major versions of Java up to Java 16:

 Java 1.0 (January 23, 1996): The first official release of Java, introducing the core
language features and libraries.

 Java 1.1 (February 19, 1997): Added significant improvements, including inner classes
and JavaBeans.

 Java 1.2 (Java 2 Platform, Standard Edition 1.2) (December 8, 1998): Introduced the
Java Collections Framework, Swing GUI toolkit, and the Java Plug-in.

 Java 1.3 (Java 2 Platform, Standard Edition 1.3) (May 8, 2000): Added the HotSpot
JVM, an XML parser, and the Java Sound API.
 Java 1.4 (Java 2 Platform, Standard Edition 1.4) (February 6, 2002): Brought
improvements like assert keyword, regular expressions, and the Java Web Start.

 Java 5 (Java 2 Platform, Standard Edition 5.0) (September 30, 2004): Introducing major
features like Generics, Annotations, Enumerations, and Autoboxing/Unboxing.

 Java 6 (Java Platform, Standard Edition 6) (December 11, 2006): Focused on


performance improvements and web services enhancements.

 Java 7 (Java Platform, Standard Edition 7) (July 28, 2011): Introduced features like the
try-with-resources statement, strings in switch, and the Fork/Join Framework.

 Java 8 (Java Platform, Standard Edition 8) (March 18, 2014): A significant release with
features like Lambda expressions, Stream API, and Date/Time API.

 Java 9 (Java Platform, Standard Edition 9) (September 21, 2017): Introduces the
modular system (Project Jigsaw), the Flow API, and the Process API improvements.

 Java 10 (Java Platform, Standard Edition 10) (March 20, 2018): Introduced local-
variable type inference (var keyword) and other minor enhancements.

 Java 11 (Java Platform, Standard Edition 11) (September 25, 2018): Long-Term Support
(LTS) version, removed some deprecated APIs, and introduced new features.

 Java 12 (Java Platform, Standard Edition 12) (March 19, 2019): Brought improvements
like switch expressions and enhancements to the Garbage Collector.

 Java 13 (Java Platform, Standard Edition 13) (September 17, 2019): Introduced new
features like text blocks and enhancements to the Z Garbage Collector.

 Java 14 (Java Platform, Standard Edition 14) (March 17, 2020): Added features like
pattern matching for instanceof, records, and more.

 Java 15 (Java Platform, Standard Edition 15) (September 15, 2020): Introduced Sealed
Classes, hidden classes, and Text Blocks enhancements.

 Java 16 (Java Platform, Standard Edition 16) (March 16, 2021): Introduced features like
JEP 338: Vector API (Incubator) and JEP 395: Records.

 Datatypes of Java
Data types specify the different sizes and values that can be stored in the variable. There
are two types of data types in Java:

Primitive data types: The primitive data types include boolean, char, byte, short, int,
long, float and double.

Non-primitive data types: The non-primitive data types include Classes, Interfaces,
and Arrays.

 Primitive data types:

1. Boolean Data Type


Boolean data type represents only one bit of information either true or false which is intended
to represent the two truth values of logic and Boolean algebra, but the size of the boolean data
type is virtual machine-dependent. Values of type boolean are not converted implicitly or
explicitly (with casts) to any other type. But the programmer can easily write conversion
code.

Syntax:
boolean booleanVar;
Size: Virtual machine dependent

2. Byte Data Type


The byte data type is an 8-bit signed two’s complement integer. The byte data type is useful
for saving memory in large arrays.
Syntax:
byte byteVar;
Size: 1 byte (8 bits)

3. Short Data Type


The short data type is a 16-bit signed two’s complement integer. Similar to byte, use a short
to save memory in large arrays, in situations where the memory savings actually matters.

Syntax:
short shortVar;
Size: 2 bytes (16 bits)

4. Integer Data Type


It is a 32-bit signed two’s complement integer.

Syntax:
int intVar;
Size: 4 bytes ( 32 bits )

Remember: In Java SE 8 and later, we can use the int data type to represent an unsigned 32-
bit integer, which has a value in the range [0, 232-1]. Use the Integer class to use the int data
type as an unsigned integer.

5. Long Data Type


The range of a long is quite large. The long data type is a 64-bit two’s complement integer
and is useful for those occasions where an int type is not large enough to hold the desired
value. The size of the Long Datatype is 8 bytes (64 bits).

Syntax:
long longVar;

Remember: In Java SE 8 and later, you can use the long data type to represent an unsigned
64-bit long, which has a minimum value of 0 and a maximum value of 264-1. The Long class
also contains methods like comparing Unsigned, divide Unsigned, etc to support arithmetic
operations for unsigned long.

6. Float Data Type


The float data type is a single-precision 32-bit IEEE 754 floating-point. Use a float (instead
of double) if you need to save memory in large arrays of floating-point numbers. The size of
the float data type is 4 bytes (32 bits).

Syntax:
float floatVar;

7. Double Data Type


The double data type is a double-precision 64-bit IEEE 754 floating-point. For decimal
values, this data type is generally the default choice. The size of the double data type is 8
bytes or 64 bits.

Syntax:

double doubleVar;

Note: Both float and double data types were designed especially for scientific calculations,
where approximation errors are acceptable. If accuracy is the most prior concern then, it is
recommended not to use these data types and use BigDecimal class instead.

It is recommended to go through rounding off errors in java.

8. Char Data Type


The char data type is a single 16-bit Unicode character with the size of 2 bytes (16 bits).

Syntax:
char charVar;

 Non-primitive data types:

The Reference Data Types will contain a memory address of variable values because the
reference types won’t store the variable value directly in memory. They are strings, objects,
arrays, etc.

1. Strings
Strings are defined as an array of characters. The difference between a character array and a
string in Java is, that the string is designed to hold a sequence of characters in a single
variable whereas, a character array is a collection of separate char-type entities. Unlike C/C+
+, Java strings are not terminated with a null character.

Syntax: Declaring a string

<String_Type> <string_variable> = “<sequence_of_string>”;


Example:

// Declare String without using new operator


String s = "GeeksforGeeks";
// Declare String using new operator
String s1 = new String("GeeksforGeeks");

2. Class
A class is a user-defined blueprint or prototype from which objects are created. It represents
the set of properties or methods that are common to all objects of one type. In general, class
declarations can include these components, in order:

Modifiers: A class can be public or has default access. Refer to access specifiers for classes
or interfaces in Java
Class name: The name should begin with an initial letter (capitalized by convention).
Superclass(if any): The name of the class’s parent (superclass), if any, preceded by the
keyword extends. A class can only extend (subclass) one parent.
Interfaces(if any): A comma-separated list of interfaces implemented by the class, if any,
preceded by the keyword implements. A class can implement more than one interface.
Body: The class body is surrounded by braces, { }.

3. Object
An Object is a basic unit of Object-Oriented Programming and represents real-life entities. A
typical Java program creates many objects, which as you know, interact by invoking
methods. An object consists of :

State: It is represented by the attributes of an object. It also reflects the properties of an


object.
Behavior: It is represented by the methods of an object. It also reflects the response of an
object to other objects.
Identity: It gives a unique name to an object and enables one object to interact with other
objects.

4. Interface
Like a class, an interface can have methods and variables, but the methods declared in an
interface are by default abstract (only method signature, no body).

Interfaces specify what a class must do and not how. It is the blueprint of the class.
An Interface is about capabilities like a Player may be an interface and any class
implementing Player must be able to (or must implement) move(). So it specifies a set of
methods that the class has to implement.
If a class implements an interface and does not provide method bodies for all functions
specified in the interface, then the class must be declared abstract.
A Java library example is Comparator Interface. If a class implements this interface, then it
can be used to sort a collection.

5. Array
An Array is a group of like-typed variables that are referred to by a common name. Arrays in
Java work differently than they do in C/C++. The following are some important points about
Java arrays.

In Java, all arrays are dynamically allocated. (discussed below)


Since arrays are objects in Java, we can find their length using member length. This is
different from C/C++ where we find length using size.
A Java array variable can also be declared like other variables with [] after the data type.
The variables in the array are ordered and each has an index beginning with 0.
Java array can also be used as a static field, a local variable, or a method parameter.
The size of an array must be specified by an int value and not long or short.
The direct superclass of an array type is Object.
Every array type implements the interfaces Cloneable and java.io.Serializable.

 Java Character Set

Characters are the smallest units (elements) of Java language that are used to write Java
tokens. These characters are defined by the Unicode character set.

A character set in Java is a set of alphabets, letters, and some special characters that are valid
in java programming language.

The first character set used in the computer system was US-ASCII (American Standard Code
for Information Interchange (ASCII pronounced as ass-kee)). It is limited to represent only
American English.

US-ASCII consists of uppercase and lowercase Latin alphabets, numerals, punctuation, a set
of control codes, and a few miscellaneous symbols.

Unicode defines a standardized 16-bit character coding system. It currently supports more
than 34,000 defined characters derived from 24 languages from America, Europe, Middle
East, Africa, and Asia (including India).

However, we use mostly basic ASCII characters to develop a program that includes letters,
digits, and punctuation marks used in normal English.

Java language uses the character sets as the building block to form the basic elements such as
identifiers, variables, array, etc in the program. These are as follows:

Letters: Both lowercase (a, b, c, d, e, etc.) and uppercase (A, B, C, D, E, etc.) letters.
Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
Special symbols: _, (, ), {, }, [, ], +, -, *, /, %, !, &, |, ~, ^, <, =, >, $, #, ?, Comma (,), Dot (.),
Colon (:), Semi-colon (;), Single quote (‘), Double quote (“), Back slash (\).
White space: Space, Tab, New line.
Unicode represents a standardized and universal character set that can be extended to
accommodate additions.

When the program source code file encoding does not support Unicode in Java, we can define
Unicode characters as escape sequences by using the notation \uXXXX, where XXXX
specifies the character’s 16-bit representation in hexadecimal.

 Tokens used in Java

A token is the smallest element of a program that is meaningful to the compiler.


Tokens can be classified as follows:

1. Keywords
2. Identifiers
3. Constants
4. Special Symbols
5. Operators

1. Keyword: Keywords are pre-defined or reserved words in a programming language.


Each keyword is meant to perform a specific function in a program. Since keywords are
referred names for a compiler, they can’t be used as variable names because by doing so,
we are trying to assign a new meaning to the keyword which is not allowed. Java
language supports following keywords:

abstract assert boolean


break byte case
catch char class
const continue default
do double else
enum exports extends
final finally float
for goto if
implements import instanceof
int interface long
module native new
open opens package
private protected provides
public requires return
short static strictfp
super switch synchronized
this throw throws
to transient transitive
try uses void
volatile while with

2. Identifiers: Identifiers are used as the general terminology for naming of variables,
functions and arrays. These are user-defined names consisting of an arbitrarily long
sequence of letters and digits with either a letter or the underscore(_) as a first character.
Identifier names must differ in spelling and case from any keywords. You cannot use
keywords as identifiers; they are reserved for special use. Once declared, you can use the
identifier in later program statements to refer to the associated value. A special kind of
identifier, called a statement label, can be used in goto statements.
Examples of valid identifiers :

MyVariable
MYVARIABLE
myvariable
x
i
x1
i1
_myvariable
$myvariable
sum_of_array
geeks123
Examples of invalid identifiers :

My Variable // contains a space


123geeks // Begins with a digit
a+c // plus sign is not an alphanumeric character
variable-2 // hyphen is not an alphanumeric character
sum_&_difference // ampersand is not an alphanumeric character

3. Constants/Literals: Constants are also like normal variables. But, the only difference
is, their values can not be modified by the program once they are defined. Constants refer
to fixed values. They are also called as literals.
Constants may belong to any of the data type.
Syntax:

final data_type variable_name;

4. Special Symbols: The following special symbols are used in Java having some special
meaning and thus, cannot be used for some other purpose.
[] () {}, ; * =
Brackets[]: Opening and closing brackets are used as array element reference. These
indicate single and multidimensional subscripts.
Parentheses(): These special symbols are used to indicate function calls and function
parameters.
Braces{}: These opening and ending curly braces marks the start and end of a block
of code containing more than one executable statement.
comma (, ): It is used to separate more than one statements like for separating
parameters in function calls.
semi colon : It is an operator that essentially invokes something called an initialization
list.
asterick (*): It is used to create pointer variable.
assignment operator: It is used to assign values.

5. Operators: Java provides many types of operators which can be used according to the
need. They are classified based on the functionality they provide. Some of the types are-
 Arithmetic Operators
 Unary Operators
 Assignment Operator
 Relational Operators
 Logical Operators
 Ternary Operator
 Bitwise Operators
 Shift Operators
 instance of operator
 Precedence and Associativity

 Basic syntax to write Java Program

class Main
{
public static void main(String[] args)
{
System.out.println("Hello World");
}
}

 The main Method


The main() method is required and you will see it in every Java program:

public static void main(String[] args)


Any code inside the main() method will be executed. Don't worry about the keywords before
and after main. You will get to know them bit by bit while reading this tutorial.

For now, just remember that every Java program has a class name which must match the
filename, and that every program must contain the main() method.

 System.out.println()
Inside the main() method, we can use the println() method to print a line of text to the screen:

public static void main(String[] args) {


System.out.println("Hello World");
}
 Type Casting

Type casting is a method or process that converts a data type into another data type in both
ways manually and automatically. The automatic conversion is done by the compiler and
manual conversion performed by the programmer. In this section, we will discuss type
casting and its types with proper examples.

 Types of Type Casting


There are two types of type casting:

1. Widening Type Casting


2. Narrowing Type Casting

1. Widening Type Casting


Converting a lower data type into a higher one is called widening type casting. It is also
known as implicit conversion or casting down. It is done automatically. It is safe because
there is no chance to lose data. It takes place when:

Both data types must be compatible with each other.


The target type must be larger than the source type.
byte -> short -> char -> int -> long -> float -> double
For example, the conversion between numeric data type to char or Boolean is not done
automatically. Also, the char and Boolean data types are not compatible with each other. Let's
see an example.

 WideningTypeCastingExample.java

public class WideningTypeCastingExample


{
public static void main(String[] args)
{
int x = 7;
//automatically converts the integer type into long type
long y = x;
//automatically converts the long type into float type
float z = y;
System.out.println("Before conversion, int value "+x);
System.out.println("After conversion, long value "+y);
System.out.println("After conversion, float value "+z);
}
}

Output:
Before conversion, the value is: 7
After conversion, the long value is: 7
After conversion, the float value is: 7.0
In the above example, we have taken a variable x and converted it into a long type. After that,
the long type is converted into the float type.

2. Narrowing Type Casting


Converting a higher data type into a lower one is called narrowing type casting. It is also
known as explicit conversion or casting up. It is done manually by the programmer. If we do
not perform casting then the compiler reports a compile-time error.

double -> float -> long -> int -> char -> short -> byte
Let's see an example of narrowing type casting.

In the following example, we have performed the narrowing type casting two times. First, we
have converted the double type into long data type after that long data type is converted into
int type.

 NarrowingTypeCastingExample.java

public class NarrowingTypeCastingExample


{
public static void main(String args[])
{
double d = 166.66;
//converting double data type into long data type
long l = (long)d;
//converting long data type into int data type
int i = (int)l;
System.out.println("Before conversion: "+d);
//fractional part lost
System.out.println("After conversion into long type: "+l);
//fractional part lost
System.out.println("After conversion into int type: "+i);
}
}

Output:
Before conversion: 166.66
After conversion into long type: 166
After conversion into int type: 166

 Packages used to take input from User

Java Scanner Class


Java Scanner class allows the user to take input from the console. It belongs to java.util
package. It is used to read the input of primitive types like int, double, long, short, float, and
byte. It is the easiest way to read input in Java program.

 Syntax

Scanner sc=new Scanner(System.in);


The above statement creates a constructor of the Scanner class having System.inM as an
argument. It means it is going to read from the standard input stream of the program. The
java.util package should be import while using Scanner class.

It also converts the Bytes (from the input stream) into characters using the platform's default
charset.

 Methods of Java Scanner Class


Java Scanner class provides the following methods to read different primitives types:

Method Description
int nextInt() It is used to scan the next token of the input as an
integer.
float nextFloat() It is used to scan the next token of the input as a float.
double nextDouble() It is used to scan the next token of the input as a
double.
byte nextByte() It is used to scan the next token of the input as a byte.
String nextLine() Advances this scanner past the current line.
boolean nextBoolean() It is used to scan the next token of the input into a
boolean value.
long nextLong() It is used to scan the next token of the input as a long.
short nextShort() It is used to scan the next token of the input as a Short.
BigInteger nextBigInteger() It is used to scan the next token of the input as a
BigInteger.
BigDecimal nextBigDecimal() It is used to scan the next token of the input as a
BigDecimal.

 How to take input from user with program

 Program:

import java.util.Scanner;
class UserInputDemo
{
public static void main(String[] args)
{
Scanner sc= new Scanner(System.in); //System.in is a standard input st
ream
System.out.print("Enter first number- ");
int a= sc.nextInt();
System.out.print("Enter second number- ");
int b= sc.nextInt();
System.out.print("Enter third number- ");
int c= sc.nextInt();
int d=a+b+c;
System.out.println("Total= " +d);
}
}

 Output:
 Operators in Java

Operators in Java are the symbols used for performing specific operations in Java.
Operators make tasks like addition, multiplication, etc which look easy although the
implementation of these tasks is quite complex.

 Types of Operators in Java



There are multiple types of operators in Java all are mentioned below:

1. Arithmetic Operators
2. Unary Operators
3. Assignment Operator
4. Relational Operators
5. Logical Operators
6. Ternary Operator
7. Bitwise Operators
8. Shift Operators
9. instance of operator

1. Arithmetic Operators
They are used to perform simple arithmetic operations on primitive data types.

* : Multiplication
/ : Division
% : Modulo
+ : Addition
– : Subtraction

 Example:

// Java Program to implement


// Arithmetic Operators
import java.io.*;

// Drive Class
class GFG {
// Main Function
public static void main (String[] args) {

// Arithmetic operators
int a = 10;
int b = 3;

System.out.println("a + b = " + (a + b));


System.out.println("a - b = " + (a - b));
System.out.println("a * b = " + (a * b));
System.out.println("a / b = " + (a / b));
System.out.println("a % b = " + (a % b));

}
}

Output:
Addition:30
Substraction:10
Multiplication:200
Division:2

2. Unary Operators
Unary operators need only one operand. They are used to increment, decrement, or negate a
value.

– : Unary minus, used for negating the values.


+ : Unary plus indicates the positive value (numbers are positive without this, however). It
performs an automatic conversion to int when the type of its operand is the byte, char, or
short. This is called unary numeric promotion.
++ : Increment operator, used for incrementing the value by 1. There are two varieties of
increment operators.
Post-Increment: Value is first used for computing the result and then incremented.
Pre-Increment: Value is incremented first, and then the result is computed.
– – : Decrement operator, used for decrementing the value by 1. There are two varieties of
decrement operators.
Post-decrement: Value is first used for computing the result and then decremented.
Pre-Decrement: The value is decremented first, and then the result is computed.
! : Logical not operator, used for inverting a boolean value.

 Example:

// Java Program to implement


// Uniary Operators
import java.io.*;

// Driver Class
class GFG {
// main function
public static void main(String[] args)
{
// Interger declared
int a = 10;
int b = 10;

// Using uniary operators


System.out.println("Postincrement : " + (a++));
System.out.println("Preincrement : " + (++a));

System.out.println("Postdecrement : " + (b--));


System.out.println("Predecrement : " + (--b));
}
}

Output:

Postincrement : 10
Preincrement : 12
Postdecrement : 10
Predecrement : 8

3. Assignment Operator
‘=’ Assignment operator is used to assign a value to any variable. It has right-to-left
associativity, i.e. value given on the right-hand side of the operator is assigned to the variable
on the left, and therefore right-hand side value must be declared before using it or should be a
constant.

The general format of the assignment operator is:

variable = value;
In many cases, the assignment operator can be combined with other operators to build a
shorter version of the statement called a Compound Statement. For example, instead of a =
a+5, we can write a += 5.

+=, for adding the left operand with the right operand and then assigning it to the variable on
the left.
-=, for subtracting the right operand from the left operand and then assigning it to the variable
on the left.
*=, for multiplying the left operand with the right operand and then assigning it to the
variable on the left.
/=, for dividing the left operand by the right operand and then assigning it to the variable on
the left.
%=, for assigning the modulo of the left operand by the right operand and then assigning it to
the variable on the left.

 Example:

// Java Program to implement


// Assignment Operators
import java.io.*;

// Driver Class
class GFG {
// Main Function
public static void main(String[] args)
{

// Assignment operators
int f = 7;
System.out.println("f += 3: " + (f += 3));
System.out.println("f -= 2: " + (f -= 2));
System.out.println("f *= 4: " + (f *= 4));
System.out.println("f /= 3: " + (f /= 3));
System.out.println("f %= 2: " + (f %= 2));
System.out.println("f &= 0b1010: " + (f &= 0b1010));
System.out.println("f |= 0b1100: " + (f |= 0b1100));
System.out.println("f ^= 0b1010: " + (f ^= 0b1010));
System.out.println("f <<= 2: " + (f <<= 2));
System.out.println("f >>= 1: " + (f >>= 1));
System.out.println("f >>>= 1: " + (f >>>= 1));
}
}

Output:

f += 3: 10
f -= 2: 8
f *= 4: 32
f /= 3: 10
f %= 2: 0
f &= 0b1010: 0
f |= 0b1100: 12
f ^= 0b1010: 6
f <<= 2: 24
f >>= 1: 12
f >>>= 1: 6

4. Relational Operators
These operators are used to check for relations like equality, greater than, and less than. They
return boolean results after the comparison and are extensively used in looping statements as
well as conditional if-else statements. The general format is,

variable relation_operator value


Some of the relational operators are-

==, Equal to returns true if the left-hand side is equal to the right-hand side.
!=, Not Equal to returns true if the left-hand side is not equal to the right-hand side.
<, less than: returns true if the left-hand side is less than the right-hand side.
<=, less than or equal to returns true if the left-hand side is less than or equal to the right-hand
side.
>, Greater than: returns true if the left-hand side is greater than the right-hand side.
>=, Greater than or equal to returns true if the left-hand side is greater than or equal to the
right-hand side.

 Example:

// Java Program to implement


// Relational Operators
import java.io.*;

// Driver Class
class GFG {
// main function
public static void main(String[] args)
{
// Comparison operators
int a = 10;
int b = 3;
int c = 5;

System.out.println("a > b: " + (a > b));


System.out.println("a < b: " + (a < b));
System.out.println("a >= b: " + (a >= b));
System.out.println("a <= b: " + (a <= b));
System.out.println("a == c: " + (a == c));
System.out.println("a != c: " + (a != c));
}
}

Output:

a > b: true
a < b: false
a >= b: true
a <= b: false
a == c: false
a != c: true

5. Logical Operators
These operators are used to perform “logical AND” and “logical OR” operations, i.e., a
function similar to AND gate and OR gate in digital electronics. One thing to keep in mind is
the second condition is not evaluated if the first one is false, i.e., it has a short-circuiting
effect. Used extensively to test for several conditions for making a decision. Java also has
“Logical NOT”, which returns true when the condition is false and vice-versa

Conditional operators are:

&&, Logical AND: returns true when both conditions are true.
||, Logical OR: returns true if at least one condition is true.
!, Logical NOT: returns true when a condition is false and vice-versa

 Example:

// Java Program to implemenet


// Logical operators
import java.io.*;

// Driver Class
class GFG {
// Main Function
public static void main (String[] args) {
// Logical operators
boolean x = true;
boolean y = false;

System.out.println("x && y: " + (x && y));


System.out.println("x || y: " + (x || y));
System.out.println("!x: " + (!x));
}
}

Output:
x && y: false
x || y: true
!x: false
 Flowchart of Compilation and Interpretation concept

The process begins with the Java source code, which is typically written with a .java
extension.
The Java source code is passed through the Java Compiler (javac). The compiler checks the
syntax and semantics of the code and converts it into an intermediate form known as
bytecode.
The bytecode is saved in a .class file, which contains instructions that can be executed by the
Java Virtual Machine (JVM).
The JVM acts as an interpreter for the bytecode. It reads and executes the bytecode line by
line, translating it into machine code or native code for the underlying system on-the-fly.
The JVM then produces the output of the program based on the bytecode execution or
displays an error message if any issues are encountered during interpretation.
 Statements and its types

In Java, a statement is an executable instruction that tells the compiler what to perform. It
forms a complete command to be executed and can include one or more expressions. A
sentence forms a complete idea that can include one or more clauses.

 Types of Statements
Java statements can be broadly classified into the following categories:

1. Expression Statements
2. Declaration Statements
3. Control Statements

1. Expression Statements
Expression is an essential building block of any Java program. Generally, it is used to
generate a new value. Sometimes, we can also assign a value to a variable. In Java,
expression is the combination of values, variables, operators, and method calls.

There are three types of expressions in Java:


Expressions that produce a value. For example, (6+9), (9%2), (pi*radius) + 2. Note that the
expression enclosed in the parentheses will be evaluate first, after that rest of the expression.
Expressions that assign a value. For example, number = 90, pi = 3.14.
Expression that neither produces any result nor assigns a value. For example, increment or
decrement a value by using increment or decrement operator respectively, method invocation,
etc. These expressions modify the value of a variable or state (memory) of a program. For
example, count++, int sum = a + b; The expression changes only the value of the variable
sum. The value of variables a and b do not change, so it is also a side effect.

2. Declaration Statements
In declaration statements, we declare variables and constants by specifying their data type
and name. A variable holds a value that is going to use in the Java program. For example:

int quantity;
boolean flag;
String message;
Also, we can initialize a value to a variable. For example:

int quantity = 20;


boolean flag = false;
String message = "Hello";
Java also allows us to declare multiple variables in a single declaration statement. Note that
all the variables must be of the same data type.

int quantity, batch_number, lot_number;


boolean flag = false, isContains = true;
String message = "Hello", how are you;

3. Control Statement
Control statements decide the flow (order or sequence of execution of statements) of a Java
program. In Java, statements are parsed from top to bottom. Therefore, using the control flow
statements can interrupt a particular section of a program based on a certain condition.

 Types of Statements in Java


There are the following types of control statements:
1. Conditional or Selection Statements
if Statement
if-else statement
if-else-if statement
switch statement
2. Loop or Iterative Statements
for Loop
while Loop
do-while Loop
for-each Loop
3. Flow Control or Jump Statements
return
continue
break

 Example of Statement

//declaration statement
int number;
//expression statement
number = 412;
//control flow statement
if (number > 10 )
{
//expression statement
System.out.println(number + " is greater than 100");
}
 Difference between Break and Continue Statement

In Java, both break and continue are control flow statements used to alter the flow of a loop
(e.g., for, while, do-while) based on specific conditions. However, they serve different
purposes:

 Break statement:

Purpose: The break statement is used to terminate the execution of a loop prematurely,
causing the program to exit the loop entirely.
Use case: When a specific condition is met inside the loop, and you want to stop the loop
from further iterations and continue executing the code outside the loop.
Effect: When the break statement is encountered, the control immediately exits the loop, and
the program continues with the code that follows the loop.

Example:

for (int i = 1; i <= 10; i++) {


if (i == 5) {
break; // The loop will exit when i becomes 5
}
System.out.println(i);
}

Output: 1 2 3 4

 Continue statement:

Purpose: The continue statement is used to skip the rest of the loop's body for the current
iteration when a specific condition is met, and it continues with the next iteration.
Use case: When you want to skip some part of the loop for certain conditions but continue
with the next iteration.
Effect: When the continue statement is encountered, the loop immediately jumps to the next
iteration, and the code below the continue statement for the current iteration is skipped.

Example:

for (int i = 1; i <= 5; i++) {


if (i == 3) {
continue; // The loop will skip the iteration when i is 3
}
System.out.println(i);
}

Output: 1 2 4 5

 Buffered Reader

In Java, BufferedReader is a class in the java.io package that allows you to read text from a
character-input stream efficiently. It provides buffering capabilities, which means it reads
data from the input stream in chunks and stores them in an internal buffer. This buffering
helps to reduce the number of actual reads from the underlying input stream, leading to
improved performance.

To use BufferedReader, you typically create an instance of it by wrapping it around an


existing Reader (such as InputStreamReader, which converts bytes to characters) to add
buffering functionality.

 ParseInt

ParseInt is a method in Java that belongs to the Integer class, which is a wrapper class for the
primitive data type int. The purpose of the parseInt method is to parse a String representation
of an integer and convert it into its corresponding int value.

Here's the syntax of the parseInt method:

public static int parseInt(String s) throws NumberFormatException


Parameters:

s: A String that represents the integer value to be parsed.


Return:

An int value representing the parsed integer.

 Array

Java array is an object which contains elements of a similar data type. Additionally, The
elements of an array are stored in a contiguous memory location. It is a data structure where
we store similar elements. We can store only a fixed set of elements in a Java array.
Array in Java is index-based, the first element of the array is stored at the 0th index, 2nd
element is stored on 1st index and so on.

Unlike C/C++, we can get the length of the array using the length member. In C/C++, we
need to use the sizeof operator.

In Java, array is an object of a dynamically generated class. Java array inherits the Object
class, and implements the Serializable as well as Cloneable interfaces. We can store primitive
values or objects in an array in Java. Like C/C++, we can also create single dimentional or
multidimentional arrays in Java.

Moreover, Java provides the feature of anonymous arrays which is not available in C/C++.

 Advantages

Code Optimization: It makes the code optimized, we can retrieve or sort the data efficiently.
Random access: We can get any data located at an index position.

 Disadvantages

Size Limit: We can store only the fixed size of elements in the array. It doesn't grow its size
at runtime. To solve this problem, collection framework is used in Java which grows
automatically.

 Types of Array in java


There are two types of array.

1. Single Dimensional Array


2. Multidimensional Array

Syntax to Declare an Array in Java

dataType[] arr; (or)


dataType []arr; (or)
dataType arr[];
Instantiation of an Array in Java
arrayRefVar=new datatype[size];
Example of Java Array
Let's see the simple example of java array, where we are going to declare, instantiate,
initialize and traverse an array.

//Java Program to illustrate how to declare, instantiate, initialize


//and traverse the Java array.
class Testarray{
public static void main(String args[]){
int a[]=new int[5];//declaration and instantiation
a[0]=10;//initialization
a[1]=20;
a[2]=70;
a[3]=40;
a[4]=50;
//traversing array
for(int i=0;i<a.length;i++)//length is the property of array
System.out.println(a[i]);
}}

Output:

10
20
70
40
50

 Class and Object

 A class is a blueprint or a template for creating objects. It defines the structure and
behavior of objects that will be created based on it. A class contains data members (fields)
and methods that define the properties and actions of the objects of that class.

Here's the syntax for defining a class in Java:

// Class declaration
public class MyClass {
// Data members (fields)
dataType fieldName1;
dataType fieldName2;
// ...
// Constructor(s)
public MyClass() {
// Constructor code (optional)
}

// Methods
returnType methodName1(parameters) {
// Method body
// ...
return returnValue;
}

returnType methodName2(parameters) {
// Method body
// ...
return returnValue;
}

// ...
}

public: The access modifier specifies the visibility of the class. In this case, it is declared as
public, which means the class can be accessed from any other class.

class: The keyword used to define a class.

MyClass: The name of the class, which follows Java naming conventions (usually starts with
an uppercase letter).

dataType: The data type of the fields or the return type of methods.

fieldName1, fieldName2: The names of the data members (fields) in the class.

returnType: The data type of the value returned by a method.

methodName1, methodName2: The names of the methods in the class.

parameters: The input parameters (if any) that a method can take.

return: The keyword used to return a value from a method.


 An object is an instance of a class. When you create an object, memory is allocated to
store its data members, and you can access the methods and fields of the class through
that object.

Here's how you can create an object of the class and access its members:

java
Copy code
// Creating an object of MyClass
MyClass myObject = new MyClass();

// Accessing fields and calling methods


myObject.fieldName1 = value1;
myObject.fieldName2 = value2;
// ...

dataType result = myObject.methodName1(arguments);


dataType result2 = myObject.methodName2(arguments);
// ...
In this example, myObject is an object of the class MyClass, and you can access its fields and
call its methods using the dot notation (objectName.fieldName or
objectName.methodName()).

Using classes and objects is a fundamental concept in Java, allowing you to create reusable
and organized code by encapsulating data and behavior within classes.

 Functions and its types

Function, also known as method in Java is a collection of instructions that performs a specific
task. It provides the reusability of code. We can also easily modify code using methods. In
this section, we will learn what is a method in Java, types of methods, method declaration,
and how to call a method in Java.

What is a method in Java?


A method is a block of code or collection of statements or a set of code grouped together to
perform a certain task or operation. It is used to achieve the reusability of code. We write a
method once and use it many times. We do not require to write code again and again. It also
provides the easy modification and readability of code, just by adding or removing a chunk of
code. The method is executed only when we call or invoke it.

The most important method in Java is the main() method. If you want to read more about the
main() method, go through the link https://www.javatpoint.com/java-main-method.
Method Declaration
The method declaration provides information about method attributes, such as visibility,
return-type, name, and arguments. It has six components that are known as method header, as
we have shown in the following figure.

 Method Signature: Every method has a method signature. It is a part of the method
declaration. It includes the method name and parameter list.

 Access Specifier: Access specifier or modifier is the access type of the method. It
specifies the visibility of the method. Java provides four types of access specifier:

Public: The method is accessible by all classes when we use public specifier in our
application.
Private: When we use a private access specifier, the method is accessible only in the classes
in which it is defined.
Protected: When we use protected access specifier, the method is accessible within the same
package or subclasses in a different package.
Default: When we do not use any access specifier in the method declaration, Java uses
default access specifier by default. It is visible only from the same package only.

 Return Type: Return type is a data type that the method returns. It may have a
primitive data type, object, collection, void, etc. If the method does not return anything,
we use void keyword.

 Method Name: It is a unique name that is used to define the name of a method. It must
be corresponding to the functionality of the method. Suppose, if we are creating a method
for subtraction of two numbers, the method name must be subtraction(). A method is
invoked by its name.
 Parameter List: It is the list of parameters separated by a comma and enclosed in the
pair of parentheses. It contains the data type and variable name. If the method has no
parameter, left the parentheses blank.

 Method Body: It is a part of the method declaration. It contains all the actions to be
performed. It is enclosed within the pair of curly braces.

 Naming a Method

While defining a method, remember that the method name must be a verb and start with a
lowercase letter. If the method name has more than two words, the first name must be a verb
followed by adjective or noun. In the multi-word method name, the first letter of each word
must be in uppercase except the first word. For example:

Single-word method name: sum(), area()

Multi-word method name: areaOfCircle(), stringComparision()

It is also possible that a method has the same name as another method name in the same
class, it is known as method overloading.

 Types of Method
There are two types of methods in Java:

1. Predefined Method
2. User-defined Method

1. Predefined Method
In Java, predefined methods are the method that is already defined in the Java class libraries
is known as predefined methods. It is also known as the standard library method or built-in
method. We can directly use these methods just by calling them in the program at any point.
Some pre-defined methods are length(), equals(), compareTo(), sqrt(), etc. When we call any
of the predefined methods in our program, a series of codes related to the corresponding
method runs in the background that is already stored in the library.

Each and every predefined method is defined inside a class. Such as print() method is defined
in the java.io.PrintStream class. It prints the statement that we write inside the method. For
example, print("Java"), it prints Java on the console.

Let's see an example of the predefined method.

Demo.java
public class Demo
{
public static void main(String[] args)
{
// using the max() method of Math class
System.out.print("The maximum number is: " + Math.max(9,7));
}
}

Output:

The maximum number is: 9

In the above example, we have used three predefined methods main(), print(), and max(). We
have used these methods directly without declaration because they are predefined. The print()
method is a method of PrintStream class that prints the result on the console. The max()
method is a method of the Math class that returns the greater of two numbers.

We can also see the method signature of any predefined method by using the link
https://docs.oracle.com/. When we go through the link and see the max() method signature,
we find the following:

Method in Java
In the above method signature, we see that the method signature has access specifier public,
non-access modifier static, return type int, method name max(), parameter list (int a, int b). In
the above example, instead of defining the method, we have just invoked the method. This is
the advantage of a predefined method. It makes programming less complicated.

Similarly, we can also see the method signature of the print() method.

2. User-defined Method
The method written by the user or programmer is known as a user-defined method. These
methods are modified according to the requirement.

How to Create a User-defined Method


Let's create a user defined method that checks the number is even or odd. First, we will define
the method.

//user defined method


public static void findEvenOdd(int num)
{
//method body
if(num%2==0)
System.out.println(num+" is even");
else
System.out.println(num+" is odd");
}
We have defined the above method named findevenodd(). It has a parameter num of type int.
The method does not return any value that's why we have used void. The method body
contains the steps to check the number is even or odd. If the number is even, it prints the
number is even, else prints the number is odd.

 How to use functions in a class

 How to Call or Invoke a User-defined Method


Once we have defined a method, it should be called. The calling of a method in a program is
simple. When we call or invoke a user-defined method, the program control transfer to the
called method.

import java.util.Scanner;
public class EvenOdd
{
public static void main (String args[])
{
//creating Scanner class object
Scanner scan=new Scanner(System.in);
System.out.print("Enter the number: ");
//reading value from the user
int num=scan.nextInt();
//method calling
findEvenOdd(num);
}
In the above code snippet, as soon as the compiler reaches at line findEvenOdd(num), the
control transfer to the method and gives the output accordingly.

Let's combine both snippets of codes in a single program and execute it.

EvenOdd.java

import java.util.Scanner;
public class EvenOdd
{
public static void main (String args[])
{
//creating Scanner class object
Scanner scan=new Scanner(System.in);
System.out.print("Enter the number: ");
//reading value from user
int num=scan.nextInt();
//method calling
findEvenOdd(num);
}
//user defined method
public static void findEvenOdd(int num)
{
//method body
if(num%2==0)
System.out.println(num+" is even");
else
System.out.println(num+" is odd");
}
}

Output 1:

Enter the number: 12


12 is even

Output 2:

Enter the number: 99


99 is odd

 What is Garbage Collection

Garbage collection is a process in Java (and other programming languages with automatic
memory management) that automatically reclaims memory occupied by objects that are no
longer in use or no longer reachable by the application. It helps manage memory efficiently
and ensures that the program does not suffer from memory leaks, where memory is allocated
but never released.

In Java, objects are created dynamically on the heap (a region of memory used for dynamic
memory allocation). When an object is no longer referenced by any variable or data structure
in the program, it becomes eligible for garbage collection.

The Java Virtual Machine (JVM) is responsible for garbage collection, and it periodically
checks for objects that are no longer reachable and releases their memory. The JVM uses
different garbage collection algorithms to perform this task, and the choice of the algorithm
depends on the JVM implementation and configuration.

 Garbage collection can be divided into the following steps:

Mark: The garbage collector traverses the object graph starting from the root objects
(typically global variables, local variables in active method frames, and static variables) and
marks all the objects that are still reachable.

Sweep: The garbage collector goes through the entire heap and reclaims memory occupied by
objects that were not marked as reachable. These objects are considered garbage and are
freed.

Compact (optional): Some garbage collectors, like the generational garbage collector, may
perform additional steps, such as compacting the memory to reduce fragmentation.

The garbage collection process is automatic and transparent to the Java developer. Java
developers do not need to manually manage memory deallocation, unlike in languages like C
and C++. However, it's still essential to be mindful of object lifetimes and avoid unnecessary
object creation to improve performance.

The garbage collection process is an essential aspect of Java's memory management model,
allowing developers to focus on writing code without worrying about manual memory
management, leading to more reliable and secure software development.

 Finalize Method

The finalize() method in Java is a method defined in the Object class. It allows an object to
perform some cleanup operations just before it is garbage collected by the JVM. The
finalize() method is called by the garbage collector when it determines that there are no more
references to the object, and the object is about to be removed from memory.

Here's the general syntax of the finalize() method:

java
Copy code
protected void finalize() throws Throwable {
// Cleanup code here
}
The finalize() method has the following characteristics:
Access Modifier: The finalize() method is defined with the protected access modifier. This
means that only the object itself or a subclass can override and call the finalize() method
directly. It cannot be accessed from other classes.

Return Type: The finalize() method has a return type of void, meaning it does not return any
value.

Exception: The finalize() method declares throws Throwable. This allows it to throw any
exception, but it's generally not recommended to throw exceptions from the finalize()
method.

It's important to note that the finalize() method has been deprecated starting from Java 9, and
it is strongly discouraged to use it for resource cleanup or any critical operations. The reason
for deprecation is that the finalize() method has several drawbacks and is not reliable for
resource management.

 Call by Value

In Java, when you pass primitive data types (like int, double, char, etc.) or references to
objects as arguments to a method, it uses a mechanism called "call by value." This means that
the value of the variable is passed to the method, rather than the actual variable itself.

Call by value means that changes made to the parameter inside the method do not affect the
original value of the variable in the calling code.

 Example:

class Operation
{
int data=50;
void change(int data)
{
data=data+100;//changes will be in the local variable only
}

public static void main(String args[])


{
Operation op=new Operation();

System.out.println("before change "+op.data);


op.change(500);
System.out.println("after change "+op.data);

}
}

 Recursion

Recursion is a programming technique where a function calls itself directly or indirectly to


solve a problem. In other words, a function in a recursive approach is defined in terms of
itself. Recursive functions are commonly used when a problem can be broken down into
smaller, more manageable subproblems that can be solved using the same algorithm.

A recursive function typically consists of two parts:

Base case(s): These are the simplest instances of the problem that can be solved directly
without further recursion. Base cases are essential to prevent infinite recursion and ensure
that the recursion eventually terminates.

Recursive case(s): These are the cases where the function calls itself with a modified version
of the problem, bringing it closer to the base case. The function continues to call itself
recursively until it reaches the base case(s).

 Here's a classic example of a recursive function to calculate the factorial of a non-


negative integer:

public class RecursionExample


{
public static void main(String[] args)
{
int n = 5;
int factorial = calculateFactorial(n);
System.out.println("Factorial of " + n + " is: " + factorial);
}

public static int calculateFactorial(int n)


{
// Base case: factorial of 0 is 1
if (n == 0)
{
return 1;
}
else
{
// Recursive case: n! = n * (n-1)!
return n * calculateFactorial(n - 1);
}
}
}

Output:

 What is JDBC?

JDBC stands for "Java Database Connectivity." It is a Java-based API (Application


Programming Interface) that provides a standard way for Java applications to interact with
relational databases. JDBC allows Java programs to connect to and manipulate data stored in
a database using SQL (Structured Query Language) statements.

With JDBC, developers can create database connections, execute SQL queries, retrieve query
results, and manage database transactions within their Java applications. JDBC abstracts the
complexities of connecting to various database systems and provides a unified interface for
interacting with different databases, such as MySQL, Oracle, PostgreSQL, Microsoft SQL
Server, and more.

JDBC consists of classes and interfaces that define the methods and operations necessary for
database communication. It includes components like DriverManager (for managing database
connections), Connection (for representing a connection to the database), Statement (for
executing SQL queries), ResultSet (for holding query results), and PreparedStatement (for
executing parameterized queries efficiently), among others.

 Differentiate between Get Text and Set Text

"Get text" and "set text" are terms commonly used in programming to refer to actions
involving data retrieval and data modification, respectively. These terms are often associated
with user interface elements, like text fields or labels, in software applications. Here's a brief
differentiation between the two:

Get Text:

"Get text" refers to retrieving the current content or value of a text-based user interface
element.
In the context of user interfaces, it means reading the text that is already present in a specific
component, such as a text field or label.
This action is used when you want to display or use the content of the element elsewhere in
the application, such as displaying it in a different part of the interface or processing it in
some way.
Set Text:

"Set text" refers to updating or changing the content or value of a text-based user interface
element.
In the context of user interfaces, it means modifying the text that is displayed in a specific
component, such as updating the text of a button, label, or text field.
This action is used when you want to change the visible content of the element based on user
interactions or other programmatic events.
In summary, "get text" is about retrieving the current content of a user interface element,
while "set text" is about updating or changing the content of the element. These actions are
fundamental when dealing with user input and display in software applications.

 Write the use of forName, getConnection, prepareStatement


function

Let's provide an example that combines the use of forName, getConnection, and
prepareStatement functions in the context of JDBC (Java Database Connectivity). In this
example, we'll demonstrate how to connect to a MySQL database, execute a parameterized
SQL query using a prepared statement, and retrieve data from the database.

Example:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class JDBCExample {


public static void main(String[] args) {
String jdbcDriver = "com.mysql.cj.jdbc.Driver";
String databaseUrl = "jdbc:mysql://localhost:3306/mydatabase";
String username = "username";
String password = "password";

try {
// Dynamically load the JDBC driver class
Class.forName(jdbcDriver);

// Establish a database connection


Connection connection = DriverManager.getConnection(databaseUrl, username,
password);

// SQL query with a parameter


String sqlQuery = "SELECT * FROM employees WHERE department = ?";

// Create a PreparedStatement with the parameterized query


PreparedStatement preparedStatement = connection.prepareStatement(sqlQuery);
preparedStatement.setString(1, "HR"); // Set the parameter value

// Execute the query


ResultSet resultSet = preparedStatement.executeQuery();

// Process the query results


while (resultSet.next()) {
int employeeId = resultSet.getInt("employee_id");
String firstName = resultSet.getString("first_name");
String lastName = resultSet.getString("last_name");
String department = resultSet.getString("department");

System.out.println("Employee ID: " + employeeId);


System.out.println("Name: " + firstName + " " + lastName);
System.out.println("Department: " + department);
System.out.println();
}

// Close resources
resultSet.close();
preparedStatement.close();
connection.close();
} catch (ClassNotFoundException e) {
System.err.println("JDBC driver class not found: " + e.getMessage());
} catch (SQLException e) {
System.err.println("Database error: " + e.getMessage());
}
}
}

In this example:

1. We dynamically load the MySQL JDBC driver using Class.forName.


2. We establish a connection to the database using DriverManager.getConnection.
3. We create a prepared statement with a parameterized SQL query using
connection.prepareStatement.
4. We set the parameter value using setString on the prepared statement.
5. We execute the query using executeQuery and process the results using a ResultSet.
6. Finally, we close the resources (result set, prepared statement, and connection) in the
finally block to ensure proper cleanup.
This example demonstrates the use of these functions to connect to a database, execute a
parameterized query, and retrieve data from it using JDBC.

 Driver Manager

DriverManager is a class in Java that plays a crucial role in the Java Database Connectivity
(JDBC) API. It is used to manage a list of database drivers. When working with databases
using JDBC, the DriverManager class is responsible for:

Loading JDBC Drivers: The DriverManager class is used to load JDBC drivers dynamically.
JDBC drivers are required to establish a connection between a Java application and a specific
database system. The DriverManager class uses the forName method to load the appropriate
driver class based on the database URL provided.

Establishing Database Connections: Once the driver is loaded, the DriverManager helps in
establishing connections to the database. It provides methods like getConnection that take a
database URL, username, and password as parameters and return a Connection object
representing the connection to the database.

Managing Multiple Drivers: The DriverManager can handle multiple drivers simultaneously.
It maintains a list of registered drivers and attempts to find a suitable driver that can establish
a connection to the specified database URL.

 Here's a simple example demonstrating the use of DriverManager to


connect to a database using JDBC:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DatabaseConnectionExample {


public static void main(String[] args) {
String jdbcUrl = "jdbc:mysql://localhost:3306/mydatabase";
String username = "username";
String password = "password";

try {
// Dynamically load the MySQL JDBC driver class
Class.forName("com.mysql.cj.jdbc.Driver");

// Establish a database connection


Connection connection = DriverManager.getConnection(jdbcUrl, username,
password);

// Perform database operations...

// Close the connection


connection.close();
} catch (ClassNotFoundException e) {
System.err.println("JDBC driver class not found: " + e.getMessage());
} catch (SQLException e) {
System.err.println("Database connection error: " + e.getMessage());
}
}
}

In this example, we:

1. Use Class.forName to load the MySQL JDBC driver class.


2. Use DriverManager.getConnection to establish a connection to the specified database
URL.

The DriverManager class simplifies the process of managing database connections and driver
loading in Java applications, making it an essential part of JDBC-based database interactions.

 Net Beans

NetBeans is an integrated development environment (IDE) that provides a comprehensive set


of tools for software development in various programming languages, primarily Java. It
offers features for coding, debugging, profiling, designing graphical user interfaces (GUIs),
and more. NetBeans is open-source and free to use, making it a popular choice among
developers, especially those working with Java and related technologies.

 Key features and components of NetBeans include:

 Multi-Language Support: While NetBeans has a strong focus on Java development, it also
supports other languages like JavaScript, HTML, CSS, PHP, and more. This makes it
suitable for a wide range of projects.
 Integrated GUI Builder: NetBeans includes a powerful and user-friendly GUI builder that
allows developers to create graphical user interfaces visually. It simplifies the process of
designing and laying out components in Java Swing applications.

 Code Editor and Code Generation: The IDE provides a feature-rich code editor with
syntax highlighting, code completion, and various productivity tools. It can generate
boilerplate code for common tasks, reducing manual coding effort.

 Debugging and Profiling: NetBeans offers robust debugging capabilities, including


breakpoints, variable inspection, and step-by-step debugging. It also provides profiling
tools to analyze application performance and memory usage.

 Version Control: NetBeans supports version control systems such as Git, Subversion, and
Mercurial, enabling seamless collaboration and code management.

 Maven and Ant Integration: It integrates with build systems like Apache Maven and
Apache Ant, making it easier to manage project dependencies and build processes.

 Plugin Ecosystem: NetBeans has a rich ecosystem of plugins and extensions that enhance
its functionality. Developers can find and install plugins for various frameworks, libraries,
and tools.

 Java EE and Web Development: NetBeans has extensive support for Java Enterprise
Edition (Java EE) development, making it suitable for creating web applications using
technologies like JavaServer Faces (JSF), Java Persistence API (JPA), and Enterprise
JavaBeans (EJB).

 Mobile Development: NetBeans provides tools for developing mobile applications for
platforms like Android and Java ME (Micro Edition).

 Community and Open Source: NetBeans is developed as an open-source project under the
Apache Software Foundation. This allows for community contributions and ensures
continuous improvement.

NetBeans has gained popularity for its user-friendly interface, strong support for Java
development, and the range of features it offers to streamline the software development
process. It's worth noting that the IDE landscape evolves, and developers often choose their
tools based on personal preferences and project requirements.
 Wamp Server

WampServer is a software bundle that provides a platform for developing and testing
dynamic web applications locally on a Windows environment. The name "WampServer" is
derived from the combination of the software components it includes: Windows, Apache,
MySQL, and PHP. It simplifies the process of setting up a web development environment on
your local machine, allowing you to work on web projects before deploying them to a live
web server.

Here's a breakdown of the components included in WampServer:

 Windows: WampServer is designed to run on Windows operating systems. It provides a


user-friendly installation and management interface for configuring and controlling the
other components.

 Apache: Apache is a widely used open-source web server software. In the context of
WampServer, Apache serves as the web server that handles incoming HTTP requests and
serves web pages to users' browsers.

 MySQL: MySQL is a popular open-source relational database management system


(RDBMS). WampServer includes MySQL to provide a local database where you can
store and manage data for your web applications.
 PHP: PHP is a server-side scripting language commonly used for web development.
WampServer bundles PHP, allowing you to write dynamic code that interacts with
databases and generates web content.

 phpMyAdmin: WampServer also includes phpMyAdmin, a web-based graphical user


interface for managing MySQL databases. It allows you to create, modify, and interact
with databases and tables without writing SQL commands manually.

 The main benefits of using WampServer include:

1. Easy Installation: WampServer provides a simple installation process that sets up a


complete web development environment on your Windows machine.

2. Local Development: With WampServer, you can develop and test your web applications
locally before deploying them to a live web server. This is particularly useful for
debugging and troubleshooting.

3. Isolation: Since WampServer runs locally on your computer, you can work on your
projects without affecting any live websites or servers.

4. Offline Access: You can develop and test your applications even when you don't have an
active internet connection.

5. Integrated Tools: The inclusion of Apache, MySQL, PHP, and phpMyAdmin in a single
package simplifies the setup and management of your development environment.

However, it's important to note that while WampServer is convenient for local development,
it is not suitable for production use. For deploying applications to a live web server, you
would need to configure and secure a production environment with separate installations of
Apache, MySQL, and PHP.

Alternatives to WampServer include XAMPP (which is similar and also includes Perl) and
individual component installations (e.g., installing Apache, MySQL, and PHP separately).
Your choice of local development environment depends on your preferences and project
requirements.

 How Insertion and Selection done in JavaForm in NetBeans

To achieve this, you would typically use the Java Database Connectivity
(JDBC) API. Here's a basic example demonstrating how to insert and select
data from a database using Java and JDBC:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DatabaseExample {


public static void main(String[] args) {
String jdbcUrl = "jdbc:mysql://localhost:3306/mydatabase";
String username = "username";
String password = "password";

try {
// Establish a database connection
Connection connection = DriverManager.getConnection(jdbcUrl, username,
password);

// Insert data into the database


insertData(connection, "John", "Doe");

// Select and display data from the database


selectData(connection);

// Close the connection


connection.close();
} catch (SQLException e) {
System.err.println("Database error: " + e.getMessage());
}
}

private static void insertData(Connection connection, String firstName, String lastName)


throws SQLException {
String insertSql = "INSERT INTO employees (first_name, last_name) VALUES (?, ?)";
PreparedStatement preparedStatement = connection.prepareStatement(insertSql);
preparedStatement.setString(1, firstName);
preparedStatement.setString(2, lastName);
int rowsAffected = preparedStatement.executeUpdate();
System.out.println(rowsAffected + " rows inserted.");
preparedStatement.close();
}

private static void selectData(Connection connection) throws SQLException {


String selectSql = "SELECT * FROM employees";
PreparedStatement preparedStatement = connection.prepareStatement(selectSql);
ResultSet resultSet = preparedStatement.executeQuery();

while (resultSet.next()) {
int employeeId = resultSet.getInt("employee_id");
String firstName = resultSet.getString("first_name");
String lastName = resultSet.getString("last_name");
System.out.println("Employee ID: " + employeeId);
System.out.println("Name: " + firstName + " " + lastName);
System.out.println();
}

resultSet.close();
preparedStatement.close();
}
}

In this example:

 We establish a connection to the database using DriverManager.getConnection.


 The insertData method inserts a new record into the database using a parameterized SQL
insert statement.
 The selectData method retrieves and displays all records from the database using a
parameterized SQL select statement.
 Make sure to replace jdbc:mysql://localhost:3306/mydatabase, username, and password
with your actual database connection details, and adjust the SQL statements to match
your database schema.

This example is a simplified illustration of inserting and selecting data using JDBC. In a real-
world scenario, you would handle exceptions, manage connections more efficiently (possibly
using connection pooling), and organize your code in a more structured manner.

 How Deletion and Updation done in JavaForm in NetBeans


Deletion and updating operations in a Java Form (JFrame) created using the NetBeans GUI
Builder typically involve working with components like buttons, text fields, and possibly data
sources like databases. Below, I'll provide a step-by-step guide on how to implement deletion
and updating functionality in a Java Form using NetBeans:

Deletion:

 Design UI:

o Create a JFrame using the NetBeans GUI Builder.


o Drag and drop a JTable onto the JFrame to display your data.
o Drag and drop a "Delete" button onto the JFrame.

 Populate the JTable:

o Populate the JTable with data from your data source (e.g., a database or an array).
o You can do this in the constructor or an initialization method of your JFrame.

 Delete Button Action:

o Double-click the "Delete" button to create an event handler.


o In the event handler method, retrieve the selected row index from the JTable.
o Delete the corresponding data from your data source (e.g., remove a record from the
database or an element from your data list).
o Remove the selected row from the JTable's model.
o

private void jButtonDeleteActionPerformed(java.awt.event.ActionEvent evt) {


DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
int selectedRow = jTable1.getSelectedRow();
if (selectedRow != -1) {
// Assuming 'dataList' is your data source
dataList.remove(selectedRow);
model.removeRow(selectedRow);
}
}

Updating:

 Design UI:

o Drag and drop a "Details" panel onto the JFrame to show editable fields for updating
data.
o Drag and drop an "Update" button onto the JFrame.

 Update Button Action:

o Double-click the "Update" button to create an event handler.


o In the event handler method, retrieve the selected row index from the JTable.
o Populate the editable fields with the data from the selected row.
o Modify the data in your data source with the updated values (e.g., update a record in
the database or modify an element in your data list).
o Update the JTable's model with the new data.

private void jButtonUpdateActionPerformed(java.awt.event.ActionEvent evt) {


DefaultTableModel model = (DefaultTableModel) jTable1.getModel();
int selectedRow = jTable1.getSelectedRow();
if (selectedRow != -1) {
// Assuming 'dataList' is your data source
Person person = dataList.get(selectedRow);

// Retrieve data from editable fields


String newName = jTextFieldName.getText();
int newAge = Integer.parseInt(jTextFieldAge.getText());

// Update the data source


person.setName(newName);
person.setAge(newAge);

// Update the JTable's model


model.setValueAt(newName, selectedRow, 1);
model.setValueAt(newAge, selectedRow, 2);
}
}

 SYSTEM REQUIREMENTS SPECIFICATIONS


 Hardware Requirements:
 Pentium4 2GHz and Above
 512MB RAM minimum
 15” Color Monitor

 Software Requirements:
 Operating System: Windows XP/Vista7/8 Operating System.
 Front End tools : Notepad,NetBeans IDE 7.2.1,Notepad++
 Backend : MySQL Server
 Output: Window Application
 Webserver : Wamp Server

Introduction To Project
“INVENTORY MANAGEMENT SYSTEM”

Managing inventory is an important part of business administration. If you have excess


inventory, money is being wasted (which is referred to as underutilization.) If you don’t have
enough, it delays deliveries. Neither one is a good scenario.

An inventory management system tracks inventory availability at all points of your supply
chain — from purchasing, to production, and finally sales to consumers. An inventory
management system is important for companies with large amounts of inventory in order to
keep it at optimal levels.

PURPOSE OF INVENTORY MANAGEMENT SYSTEM :


The main purpose of inventory management is to help businesses easily and efficiently manage the
ordering, stocking, storing, and using of inventory. By effectively managing your inventory, you’ll
always know what items are in stock, how many of them there are, and where they are located.
Plus, practicing strong inventory management allows you to understand how you use your inventory–
and how demand changes for it–over time. You can zero in on exactly what you need, what’s not so
important, and what’s just a waste of money. That’s using inventory management to
practice inventory control. By the way, inventory control is the balancing act of always having
enough stock to meet demand, while spending as little as possible on ordering and carrying inventory.
If you count your inventory manually every time you need to find out what’s in stock, you take
physical inventory. If you’re constantly updating what you’ve got on hand and where it is, you take
perpetual inventory.
Related: What is the difference between perpetual inventory and physical inventory?
Perpetual inventory is practically impossible to track manually. There are just too many moving parts!
You’ll almost certainly require technology, like an inventory app, to keep your records up to date.
Key automation features, like QR code scanning, can make keeping your inventory app synced fast
and simple.
If you take physical inventory, you can decide between using pen and paper, an inventory
spreadsheet, or inventory management software. Just know that manual tracking tends to take a lot of
time, and can lend itself to human error.

FUNCTION OF INVENTORY MANAGEMENT SYSTEM :

1. Improved Productivity and Efficiency:


Inventory management software enables us to increase productivity and efficiency by
implementing automated daily manual tasks. This will assist you to maximize the
growth of your business.
The software saves uncountable hours and gives the opportunity to print shipping
labels, process and dispatch orders, manage stock, create and update the listing on the
system.

2. Avoid Stock-outs and Over-stock:


When it comes to maintaining the balance sheet of inventories and its management, it
is a difficult and challenging task to handle. Case of less stock leads to stock-out
which not only disrupt customer relation but cause a possible loss whereas in case of
over-stock its storage creates a problem.
With inventory management software installed, you can set a limit for re-ordering so
that stock when drops it gets automatically re-ordered.

3. Quality Management:
The software has the ability to identify and track issues that can cause delayed
shipment or broken packages. Through the already feed data provides guidance to
quality management.

4. Easy Inventory Management:


The software makes the process of inventory management a lot easier which saves
money and time both. It assists to automate the business processes and guides to make
smarter decisions.

5. Improved Profitability:
The software helps to reach the maximum amount for business investment. It uses
marketing and production to increase profits. With the software's ability to
automatically operate the business in terms of management of inventory possibility of
fulfilling tasks efficiently and accurately, increases.
It can be in any terms from managing stocks to updating lists on all channels. Then
the processing orders will turn to reduce expenses and maximize profitability.

6. Planned Management:
You can identify the possibilities of opening multiple stock storehouses located near
the customers' location. This will increase efficiency and improve service levels.

7. Balanced Supply and Demand:


When it comes to delivery, time is the focus point. Delivery should be given at the
exact time that also with the least pay amount and excess of features.

8. Inventory Reports:
The software is meant to generate automated reports. You can get any report such as a
low stock report, inventory validation report, inventory forecast report.
9. Inventory Tracking:
Inventory tracking is the most beneficial function and feature of inventory
management software. The software keeps the track of unlimited serial numbers from
when the inventory is received until the time it is issued.

10. All-in-one Solution:


The inventory management software is an allrounder when it comes to providing
services. It provides you work order management, listing management, shipping
management, and will assist you in its streamlined working.

OUR PROJECT CONTAIN 1 MODULE


ADMIN:
ADMIN can create info about :
1.Add inventor info
2.Delete inventory info
3.Delete dealer info
4.Admin Login
5.Welcome Admin
6.Search Product info
7.Create Dealer
8.Update Dealer Info
9.View Inventor Info
10.View Dealer Info

NATURE OF INVENTORY MANAGEMENT SYSTEM


Inventory management is vital to a company’s health because it helps make sure there is
rarely too much or too little stock on hand, limiting the risk of stockouts and inaccurate
records.

Public companies must track inventory as a requirement for compliance with Securities and
Exchange Commission (SEC) rules and the Sarbanes-Oxley (SOX) Act. Companies must
document their management processes to prove compliance.

Benefits of Inventory Management:

The two main benefits of inventory management are that it ensures you’re able to fulfill
incoming or open orders and raises profits. Inventory management also:

 Saves Money:
Understanding stock trends means you see how much of and where you have
something in stock so you’re better able to use the stock you have. This also allows
you to keep less stock at each location (store, warehouse), as you’re able to pull from
anywhere to fulfill orders — all of this decreases costs tied up in inventory and
decreases the amount of stock that goes unsold before it’s obsolete.
 Improves Cash Flow:
With proper inventory management, you spend money on inventory that sells, so cash
is always moving through the business.
 Satisfies Customers:
One element of developing loyal customers is ensuring they receive the items they
want without waiting.

Feature Of Inventory Management System:


Inventory management systems have software features that target particular markets,
customer bases and product types. In this section, you’ll find examples of the top inventory
management system features to consider based on industry.

Manufacturing
Inventory management systems for manufacturing have hybrid features for material-based
inventory and warehouse management. These features incorporate advanced unit conversion
capabilities to handle bulk material stock, incorporate lean manufacturing methodologies,
material requirements planning and bill of material invoicing.

Top inventory management system features for manufacturing include:

 Unit-of-Measure Conversion: Convert inventory quantities received to a higher or


lower unit of measure.
 Automated Ordering: Set stock limits and place orders when inventory drops below
a given quantity.
 Raw Materials Planning: Track direct or indirect raw materials by purchasing and
production cycles, create a bill of materials and determine the return on investment
(ROI) for a given raw material.
 Purchase Order Management: Assign suppliers, track product lead times and
manage purchase order lifecycles.
 Serialized Inventory: Drill down to individual items instead of SKUs to trace a
product lifecycle, identify defective inventory and track warranty information.
Wholesale Distribution
Wholesalers with online distribution channels need inventory management features that help
control and trace bulk inventory, manage multiple suppliers and customers and automate
processes.

Top features for wholesale distributors include:

 Sales Order Fulfillment: Use a single dashboard to view sales orders, create packing
slips and automate email confirmations to customers.
 Multiple Warehouse Fulfillment: Track and fulfill orders with inventory stored
across multiple warehouses.
 Kitting: Control, transfer andconnect items normally tracked individually to a
bundled sales order for offerings like a subscription box.
 Lot Tracking: Track multiple quantities of perishable, time-sensitive items by
manufacturer expiration date with traceable lot numbers.
 Bin Management: Bin management allows for inventory to be received at the
warehouse and put-away into preferred bins within the rack system of the warehouse
for easy picking later during the order fulfillment process
Retail
Retailers depend on inventory management features that optimize the in-store customer
experience. They need solutions that improve inventory tracking, demand forecasting and
inventory alerts. Accurate, multi-location management features are essential for multi-
channel operations (e.g. buy online, pickup in-store). Point-of-sale and accounting integration
features are crucial for profitable brick-and-mortar retail operations. Read our guide on retail
inventory management for tips and best practices.
Top features for retail include:

 Partial Receiving: Control and track partially received inventory.


 Backorder Management: Create new purchase orders with consolidated sales orders
by supplier and track products by type, estimated arrival or season.
 Demand Forecasting: Set preferred stock levels by seasonal demand, automate
multi-location replenishment and generate reports to identify future demand trends.
 Cycle Counting: Categorize inventory by volume, value or transactions and receive
automated prompts for inventory counts to establish safety stock levels. Read
our cycle counting guide to learn more about this process.
Ecommerce
Ecommerce inventory systems need to support accurate inventory controls and automated
processes that deliver products to customers without interruption. Accounting integrations
that incorporate online payment processing, email invoicing and inventory tracking are
popular ecommerce features.

Top inventory management system features for ecommerce include:

 Returns Handling: Send customer email updates, assign warehouses to receive a


returned item and generate reports on return trends.
 Automatic Restocking: Generate automated purchase orders when stock goes below
a pre-set level.
 Multi-Carrier Shipping: Store contact information and data on preferred shipping
carriers and manage multiple logistics providers.
 Virtual Stock Control: Create virtual inventory and manage drop-ship logistics with
supplier inventory stored elsewhere.
 Display inventory availability on website: Accurately reflect the availability of
stock on ecommerce platforms.

SCOPE OF INVENTORY MANAGEMENT SYSTEM :

 Manage Inventory: Inventory management helps to manage the stock of the


company. it provides proper details of the products what kind of raw material,
what are the sizes we require and etc. to the purchasing department.
 Less Storage: When the inventory management provides proper information
to management, they buy according to them which helps the company to store
fewer products.
 Improve Productivity: Inventory management helps to improve the
productivity of the machines and manpower. Employees are aware of stocks
and the quantity that require to produce.
 Increase Profits: Inventory management helps to improve the profits of the
company. it helps to provide proper information about stocks, that saves the
unnecessary expenses on stocks.

DATABASE Data Flow Diagram:


Our backend contain two tables and one database:
Database Name:
 Inventory_management_system

TABLE NAME

DATABASE SCREENSHOTS
DATA BASE NAME : INVENTORY

TABLE :DATA

TABLE:INV
DATABASE ENTRIES SCREEN SHOTS:
PROJECT SCREENSHOTS
Step 1: Open Project
Step 2: Choose Destination

Step 3:Run project

Project contain 10 forms:


1.Login_admin:
2.Main_admin:

3.Dealer ID:
4.View:

5.Delete:
6.Search:

7.Logout:
FUTURE WORK OF
INVENTORY MANAGEMENT SYSTEM :
In many businesses, particularly service providers, stock is often also stored across a fleet of
vans. This can make it difficult to monitor stock levels, which in turn makes it problematic to
spot where excess stock has been ordered or where stock levels are running low. Too many
businesses are relying on manual processes that inevitably increase inventory errors and
inaccuracies. In a recent article, Finance Online confirmed ‘It’s alarming that many
businesses, particularly SMBs, are still not utilizing inventory management systems for
operations. Moreover, some don’t even have a way to track their inventory.’1

Inadequate inventory management results in delays and time wasted on jobs that cannot be
completed efficiently due to unaccounted for stock-outs. Stock-outs can result in high
emergency delivery or collection costs, just to enable a job to be completed, as well as an
increased risk of costly production downtime. Other inadequacies with inventory
management result in delays, inaccurate invoicing, and poor cash flow, which leads to
excessive spend or overconsumption of some materials. According to IHL Group, ‘the
estimated value of global inventory distortion among mass merchants and grocery retailers in
2020 is $176.7 billion for overstock and $568.7 billion for out-of-stock.’2

App-based Inventory Management systems

Spreadsheets, paper, and stand-alone systems can’t deliver the inventory accuracy and
supply-chain visibility it takes to stay competitive in the digital world.

App-based store and van stock management systems are becoming more popular as supply-
chain logistics become more complicated, and customers become increasingly demanding.
According to Easy Post, ‘Companies can reap a 25% increase in productivity, a 20% gain in
space usage, and a 30% improvement in stock use efficiency if they use integrated order
processing for their inventory system.’3 Advanced mobile applications allow companies to
manage their inventory and supply chains effectively. These systems efficiently record every
scan and every movement of inventory and are designed to prioritise inventory accuracy, cost
reduction, and charge capture through job number management. Businesses spend a
significant amount of money on financing and stocking their inventory and it’s important to
optimise this inventory to remain competitive. With extended lead times due to the pandemic,
companies are having to invest more capital in inventory to ensure supply to customers.

In a McKinsey survey of global supply-chain leaders, it was found that 61% of respondents
were either planning to increase or had already increased, the inventory of business-critical
products in order to boost ‘supply chain resilience’ as a result of the pandemic.’4 And research
from IHL found that inventory distortion costs in 2020, in the retail sector alone, cost retailers
‘collectively nearly $1.8 Trillion globally.’5 There are also ever-increasing expectations for
improving Key Performance Indicators (KPIs) for customer service. Therefore, achieving
inventory excellence, by optimising through app-based inventory management systems, is
becoming increasingly important to support the customer-service function, improve cash flow
and increase profitability.

Store and van stock management is being revolutionised with the use of inventory and
supply-chain management apps on mobile devices. However, not all app-based inventory
management systems are the same.

It is essential that the inventory management solution a business chooses has the
functionality required to enhance the operations of the business

Leading-edge app-based Inventory Management systems:

 make use of the best technologies to manage the process


 can be used on specialised, rugged Android devices, such as Zebra and HandHeld,
which utilise both laser barcode and Near Field Communication (NFC) capability
 utilise technology that speeds up the process of managing inventory
 are easy to use for operatives – the more intuitive the app, the easier it is for
widespread adoption of the technology within a business.

The store is at the centre of all operational activity, responsible for stocking and distributing
supplies such as tools, equipment, personal protective equipment (PPE), and supplies to
employees, enabling them to fulfil their business requirements.

It is therefore essential that the inventory management solution a business chooses has the
functionality required to enhance the operations of the business.

BIBLIOGRAPHY
General
1. Oracle Java mother site @ https://www.oracle.com/technetwork/java/index.html.
2. OpenJDK mother site @ https://openjdk.java.net/.
3. Java Documentation @ https://docs.oracle.com/en/java/index.html.

JDK (Java SE or Java Platform Standard Edition)


1. JDK (Java SE) mother site
@ https://www.oracle.com/technetwork/java/javase/overview/index.html.
2. JDK API Documentation Online
@ https://docs.oracle.com/en/java/javase/11/ (for JDK 11).
3. Ken Arnold, James Gosling and David Holmes, "The Java Programming
Language", 4th ed, 2005. (The defacto standard for Java Language, but does not
seem to have been updated to cover the latest features?!)
4. James Gosling, Bill Joy, Guy Steele and Gilad Bracha, "The Java Language
Specification", 3rd ed, 2005. (The defacto standard for JVM, but does not seem
to have been updated?!)
5. JDK Demos and Samples (to be downloaded
@ https://www.oracle.com/technetwork/java/javase/downloads/index.html).

You might also like