#LifeKoKaroLift
Programming in Java CSE-229
 1
Course : Prog. In Java
Lecture On : Intro to Java
 Edit Master
Instructor textWaseem
 : Er. styles
 2
Poll 1Edit Master text styles
On a scale of 1-5, how familiar are you with
Programming in General?
 • Practice in teams of 4 students
 • Industry expert mentoring to learn better
 • Get personalised feedback for improvements
23/05/19 Footer 11 3
 Edit Master text styles
Poll 2
On a scale of 1-5, how familiar are you with Java?
 • Practice in teams of 4 students
 • Industry expert mentoring to learn better
 • Get personalised feedback for improvements
23/05/19 Footer 11 4
Today’s Agenda
 ● Course Details
 ● Course Assessment Model
 ● What is Java
 ● Why Learn Java
 ● Areas of Application
 ● JDK & IDE Installation
 ● Writing First Program
 Data Science Certification Program 5
Course Details
• L T P – 3 0 2 [Three lectures/week]
• References
1. Introduction to Java Programming by Y. Daniel Liang, Pearson
2. Java The Complete Reference by Herbert Schildt, Mcgraw Hill
Education
Course Assessment Model
• Marks break up
• Attendance 05
• CA ( 150 Qs + Best 2 out of 3 CA) 50 (20 + 15 * 2)
• ETP (Platform Based Coding + Viva) 45
• Total 100
Course Outcomes
• Using basic constructs of Java
 programming to solve the real world
 problems.
• Applying the Object Oriented
 Programming (OOP) principles to
 write efficient and reusable codes.
• Understanding the application of
 abstract classes, interfaces and
 Lambda expressions.
Course Outcomes
• Developing robust java applications
 to handle environment specific
 issues at run time
• Using predefined java libraries and
 in built data structures to develop
 efficient java applications
 Program Outcomes
PO1
Engineering knowledge: Apply the knowledge of mathematics, science, engineering
fundamentals, and an engineering specialization to the solution of complex
engineering problems.
PO2
Problem analysis: Identify, formulate, research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of
mathematics, natural sciences, and engineering sciences.
PO3
Design/development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with
appropriate consideration for the public health and safety, and the cultural, societal,
and environmental considerations.
 Program Outcomes
PO4
Conduct investigations of complex problems: Use research-based knowledge and
research methods including design of experiments, analysis and interpretation of data,
and synthesis of the information to provide valid conclusions.
PO5
Modern tool usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex
engineering activities with an understanding of the limitations.
PO6
The engineer and society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent
responsibilities relevant to the professional engineering practice.
 Program Outcomes
PO7
Environment and sustainability::Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of,
and need for sustainable development.
PO8
Ethics::Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
PO9
Individual and team work::Function effectively as an individual, and as a member or
leader in diverse teams, and in multidisciplinary settings.
 Program Outcomes
PO10
Communication::Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as, being able to comprehend
and write effective reports and design documentation, make effective presentations, and
give and receive clear instructions.
PO11
Project management and finance::Demonstrate knowledge and understanding of the
engineering, management principles and apply the same to one’s own work, as a
member or a leader in a team, manage projects efficiently in respective disciplines and
multidisciplinary environments after consideration of economic and financial factors.
PO12
Life-long learning::Recognize the need for, and have the preparation and ability to
engage in independent and life-long learning in the broadest context of technological
change.
Course Contents
Unit I:
• Apply the installation and setup of JDK to execute Java programs.
• Demonstrate writing, compiling, and executing Java programs using
 Command Prompt and IDE.
• Use comments effectively to document Java code.
• Identify and debug Java programs.
• Recognize primitive data types, variables, and operators in Java.
• Use arrays and manipulate characters and strings in Java.
Course Contents
Unit II:
• Apply basic input and output operations in Java.
• Use conditional statements and loops (for, while, do-while) for control flow
 in Java programs.
• Design and define methods, and invoke them.
• Demonstrate method overloading and understand lambda expressions.
Course Contents
Unit III:
• Understand Object-Oriented Programming (OOP) principles and recognize
 its benefits.
• Design and use classes and objects to model real-life problems.
• Demonstrate the use of constructors and apply keywords like this, final,
 and static.
• Understand encapsulation and implement getter and setter methods with
 private access modifiers.
Course Contents
Unit IV:
• Understand inheritance and apply it in Java.
• Demonstrate working with subclasses and superclasses, and method
 overriding.
• Differentiate between inheritance and composition in Java.
• Design abstract classes, create subclasses, and use interfaces with default
 and static methods.
Course Contents
Unit V:
• Use arrays and linked lists effectively, and perform basic operations on
 ArrayList and LinkedList.
• Utilize iterators and measure the performance of operations in ArrayList
 and LinkedList.
• Handle exceptions, including catching, throwing, and propagating
 exceptions.
• Create and use custom exceptions.
Course Contents
Unit VI:
• Apply assertions in Java for testing the environment.
• Use the Stream API to create and manipulate streams in Java.
• Demonstrate object serialization using ObjectInputStream and
 ObjectOutputStream in Java.
The hitch ...
The three BURNING questions in mind…
• What is Programming?
• What is Java?
• Why Learn Java?
What is Programming?
• Programming is giving a set of
 instructions to a computer to
 execute.
• Programming is the mental
 process of thinking up instructions
 to give to a machine (like a
 computer).
• Coding is the process of
 transforming those ideas into a
 written language that a computer
 can understand.
What is Java
• Java is a high-level, versatile, general-purpose, class-based, object-
 oriented, and widely-used programming language.
• It was developed by Sun Microsystems (now owned by Oracle) and
 is designed to be platform-independent, meaning it can run on various
 systems without modification.
• Java uses an object-oriented approach, where programs are built
 as collections of objects that interact with each other to perform tasks.
Why Learn Java?
• Despite been around for 27 years as of 2023, Java remains the 3rd most
 popular and widely language worldwide.
• 90% of Fortune 500 companies still use Java for building high-performance
 enterprise-level applications.
• Write Once, Run Anywhere (WORA) philosophy allows Java programs
 to be executed on any platform with a compatible JVM. This portability is a
 significant advantage over languages that are tied to specific operating
 systems or architectures.
Why Learn Java (contd.) ?
Why Learn Java (contd.) ?
• Robust and Safe: Java was designed with a strong emphasis on safety
 and robustness. Features like exception handling, access control, and
 security mechanisms contribute to creating more reliable software.
• Java comes with a vast standard library that provides a rich set of
 classes and functions, making it easier for developers to perform common
 tasks without having to rely heavily on external libraries.
• Java has a massive and active community that contributes to its
 continuous improvement. Additionally, the vast ecosystem of libraries,
 frameworks, and tools provides developers with numerous resources to
 enhance their projects.
Areas of Application
JDK Installation (for windows)
Download JDK 8:
• Go to the Oracle website or OpenJDK website (depending on your
 preference for Oracle or open-source JDK).
• Locate the JDK 8 download page. Make sure to download the version
 appropriate for your Windows operating system (32-bit or 64-bit).
Run the Installer:
• Once the download is complete, locate the downloaded file (usually named
 something like "jdk-8uXXX-windows-x64.exe" for 64-bit or "jdk-8uXXX-
 windows-i586.exe" for 32-bit).
• Double-click the file to start the installation.
JDK Installation (for windows)
Choose Installation Directory:
• The installer will prompt you to select the installation directory. By default, it
 will be something like "C:\Program Files\Java\jdk1.8.XXX" (XXX represents
 the update number). You can choose a different directory if you prefer.
Complete the Installation:
• Follow the on-screen instructions to complete the installation process. You
 may be asked to accept the license agreement before the installation
 proceeds.
JDK Installation (for windows)
Set Environment Variables:
• After installation, you need to set up environment variables so that your
 system can locate the JDK installation.
• Right-click on "This PC" (or "My Computer") and select "Properties."
• Click on "Advanced system settings" on the left-hand side.
• In the "System Properties" window, click the "Environment Variables"
 button at the bottom.
• Under the "System variables" section, click "New" to create a new variable.
JDK Installation (for windows)
• Set the variable name to "JAVA_HOME" and the variable value to the path
 of your JDK installation (e.g., "C:\Program Files\Java\jdk1.8.XXX").
• Next, find the "Path" variable under "System variables" and click "Edit."
• Add a new entry with the value "%JAVA_HOME%\bin" to include the JDK's
 "bin" directory in your system's PATH.
Verify the Installation:
• Open Command Prompt and type java -version to check if the JDK is
 installed correctly. You should see the JDK version information displayed.
JDK Installation (for mac)
Download JDK 8:
• Go to the Oracle website or OpenJDK website (depending on your
 preference for Oracle or open-source JDK).
• Locate the JDK 8 download page. Look for the version suitable for macOS.
Run the Installer:
• Once the download is complete, locate the downloaded file (usually named
 something like "jdk-8uXXX-macosx-x64.dmg).
• Double-click the DMG file to mount it.
JDK Installation (for mac)
Install JDK:
• In the mounted disk image, double-click the JDK package file (usually
 named something like "JDK 8 Update XXX.pkg").
• The macOS Installer will guide you through the installation process. Follow
 the on-screen instructions to install JDK 8.
Set Environment Variables (Optional):
• By default, macOS sets the necessary environment variables for Java
 automatically.
JDK Installation (for mac)
Verify the Installation:
• Open a new terminal window, and type java -version to check if the JDK is
 installed correctly. You should see the JDK version information displayed.
Intellij IDEA Installation
Step 1: Visit the official website of JetBrains IntelliJ IDEA
Step 2: Choose the edition
Step 3: Download the installer
Step 4: Run the installer
Step 5: Choose installation options
Step 6: Complete the installation
Step 7: Launch IntelliJ IDEA
Step 8: Set up your environment
Write your first program in Java !
Any Questions?
Key Takeaway
 ● Course Overview
 ● Introduction to Java
 ● IDE & Environment Setup
 Data Science Certification Program 37
 #LifeKoKaroLift
Thank You!
 38