0% found this document useful (0 votes)
16 views35 pages

Intro To Java Programming

The document provides an introduction to Java, highlighting its popularity and opportunities for developers in various domains such as enterprise software, Android app development, and big data. It details the Java Development Kit (JDK), its components, and the significance of Java bytecode for platform independence. Additionally, it discusses the exclusive features of Java that differentiate it from other programming languages like C and Python.

Uploaded by

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

Intro To Java Programming

The document provides an introduction to Java, highlighting its popularity and opportunities for developers in various domains such as enterprise software, Android app development, and big data. It details the Java Development Kit (JDK), its components, and the significance of Java bytecode for platform independence. Additionally, it discusses the exclusive features of Java that differentiate it from other programming languages like C and Python.

Uploaded by

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

Introduction to

Java

GITAM School of Technology


Most used programming languages
among developers worldwide as of
2024

GITAM School of Technology


Opportunities for Java
AnDevelopers
inspiration to Aspiring Java Learner
Some specific companies where Java developers are in high demand to start with
Cheers☺
Domain Companies Opportunities What has to be done
Enterprise Software Oracle, IBM, SAP, Accenture Enterprise software for Java developers here focus
Development resource planning (ERP) on scalable, reliable software
customer relationship solutions for large
management (CRM) organizations.
database management
systems

Android App Development Google, Samsung, Uber, Android app development While newer Android apps
Spotify, Netflix and maintenance. may be developed in Kotlin,
Java is still extensively used,
especially in legacy
codebases, updates, and app
scaling.

Backend Development for Goldman Sachs, J.P. Morgan, Backend systems for financial Java developers build stable,
High-Performance Bank of America, Bloomberg applications, where high-performance trading and
Applications transaction processing speed, banking software.
data integrity, and security
are critical.

GITAM School of Technology


Opportunities for Java
Developers(contd..)
An inspiration to Aspiring Java Learner
Some specific companies where Java developers are in high demand to start with
Cheers☺
Domain Companies Opportunities What has to be done
Big Data and Analytics Cloudera, Hortonworks, Data processing and Java developers here work
LinkedIn, Amazon (AWS), analytics platforms on big data frameworks like
Microsoft (Azure) Hadoop and Spark, building
data solutions that handle
massive amounts of
information efficiently.

Financial and Banking Google, Samsung, Uber, Building secure financial Java developers are essential
Software Spotify, Netflix software, payment processing in fintech and banking to
systems, and risk ensure data privacy and
management solutions. system reliability.

Internet of Things (IoT) Bosch, Siemens, GE Digital, IoT applications for industrial Java developers create
Schneider Electric automation, smart cities, and software for IoT devices,
healthcare. which can operate across
different hardware setups,
leveraging Java’s device
portability.

GITAM School of Technology


Opportunities for Java
Developers(contd..)
An inspiration to Aspiring Java Learner
Domain Some specific companies
Companieswhere Java developers are in high demand to start What
Opportunities withhas to be done
Cheers☺
Web Development with Spring and Pivotal (Spring’s developer), Building web applications and Java developers use Spring Boot to
Spring Boot Expedia, Intuit, Alibaba, Tata microservices. develop secure, scalable, and robust
Consultancy Services (TCS) web applications, especially in
business-to-business (B2B)
environments.

Cloud Computing and Microservices Amazon Web Services (AWS), Cloud-native applications and Java developers design cloud
Google Cloud, Microsoft Azure, IBM microservices. solutions and develop microservices
Cloud using frameworks like Spring Cloud,
focusing on scalability, resilience,
and deployment automation.

Machine Learning and Artificial DeepMind (Google), IBM Watson, Building ML/AI solutions that ava developers use Java libraries for
Intelligence Salesforce, Baidu integrate with enterprise machine learning (like
applications. Deeplearning4j) and develop
applications where stability and
performance are critical.

Blockchain Development Hyperledger (Linux Foundation), R3 Developing blockchain and Java developers work on enterprise
(Corda), IBM Blockchain, JPMorgan distributed ledger applications. blockchain solutions that demand
(Quorum), Chain high levels of security, transparency,
and efficiency in transactions.

GITAM School of Technology


Exclusive Features Of Java
That differentiates it from C and
• Platform Independence: Python
• Java’s "write once, run anywhere" philosophy is made possible by the Java Virtual Machine (JVM), allowing Java
bytecode to run on any platform with a JVM.
• C, in contrast, needs to be compiled for each specific platform
• Python is interpreted language.
• Strictly Enforced Object-Oriented Design:
• Java enforces a purely object-oriented approach (with everything based in classes and objects, except for
primitive data types)
• C is procedural
• Python is more flexible, allowing both procedural and object-oriented programming styles.
• Memory Management with Automatic Garbage Collection:
• Java has a built-in garbage collector that automatically manages memory by removing unused objects.
• C lacks automatic garbage collection, requiring manual memory management.
• Python also has garbage collection, Java’s approach is specifically integrated with JVM optimizations.

GITAM School of Technology


Exclusive Features Of Java
That differentiates it from C and Python
• Security Features: (contd..)
• Java offers robust security features, such as the Java Security Manager, which allows us to define security policies
at the bytecode level, sandboxing code to restrict access to resources.
• Neither C nor Python has this level of built-in security at the language level.
• Built-in supportx for Distributed Computing:
• Java includes networking capabilities (like RMI – Remote Method Invocation) that facilitate distributed
computing.
• While Python has libraries for this, and C can achieve it with additional libraries, Java offers integrated solutions.
• Annotations and Metadata:
• Java supports annotations that allow developers to embed metadata within the code, which can be used by
compilers, JVM, or frameworks.
• This concept is not present in C
• Python has decorators, but it lacks the structured, built-in metadata capabilities offered by Java.
• Strongly Typed with Compile-Time Checks:
• Java is a statically typed language, enforcing strict type checks at compile time, reducing runtime errors.
• In contrast, Python is dynamically typed.
• C is also statically typed, it lacks some of the strictness Java provides in type safety.
GITAM School of Technology
Exclusive Features Of Java
That differentiates it from C and Python
• Checked Exceptions: (contd..)
• Java is unique in having checked exceptions, requiring developers to handle or declare certain types of
exceptions explicitly, enhancing code robustness.
• C does not have exception handling natively
• Python has untyped exceptions without the same mandatory handling structure.
• Concurrency with Native Thread Support:
• Java provides built-in support for multithreading and concurrent programming through its java.lang.Thread class
and concurrency package java.util.concurrent
• Python supports multithreading, it is limited by the Global Interpreter Lock (GIL) in the standard implementation
(CPython)
• C requires external libraries for multithreading.
• Bytecode Compilation and JVM Optimization:
• Java compiles to an intermediate bytecode, which the JVM then optimizes at runtime (just-in-time compilation),
making Java applications often faster than Python's interpreted code and giving a different optimization model
than C's direct compilation to machine code.

GITAM School of Technology


Key Attributes of Object Oriented
Programming

GITAM School of Technology


Procedure Oriented Programming

GITAM School of Technology


Key Attributes of Object Oriented
Programming

GITAM School of Technology


Key Attributes of Object Oriented
Programming

GITAM School of Technology


Key Attributes of Object Oriented
Programming

GITAM School of Technology


Key Attributes of Object Oriented
Programming

GITAM School of Technology


Key Attributes of Object Oriented
Programming

GITAM School of Technology


GITAM School of Technology
Java Development Kit
(JDK)
• What JDK Is:
• The Java Development Kit is a software development environment used to develop Java applications and applets.
• It’s a collection of tools needed to create, compile, and run Java programs.
• Key Components:
• Java Compiler:
• Converts your Java source code (.java files) into bytecode (.class files), making it understandable by the Java
Virtual Machine (JVM).
• Java Virtual Machine (JVM):
• This is the runtime environment that runs Java bytecode, allowing Java applications to be platform-
independent.
• Java Runtime Environment (JRE):
• A subset of the JDK that includes only what’s needed to run Java programs, not develop them.
• Debugger (jdb):
• Helps in finding and fixing errors in code.
• Java Documentation Generator (Javadoc):
• Automatically generates documentation from source code comments.

GITAM School of Technology


Java Development Kit
(JDK)

GITAM School of Technology


Java Development Kit (JDK)
(contd..)
• Purpose of the JDK:
• It’s primarily for developers and provides everything needed to develop and test Java applications.
• Without the JDK, they wouldn't be able to compile Java programs.
• Importance of Installation:
• Installation process
• Set up environment variables like JAVA_HOME and PATH to ensure the system recognizes JDK commands globally.
• Versions and Updates:
• The JDK is frequently updated to add new features and improvements.
• It is encouraged to work with the latest LTS (Long-Term Support) versions
• IDE Integration:
• Most Integrated Development Environments (IDEs) like Eclipse, IntelliJ IDEA, and NetBeans integrate seamlessly
with the JDK, enhancing the development experience.

GITAM School of Technology


Byte code

GITAM School of Technology


Byte Code
• A bytecode is a binary program code that can only run on JVM.
• In other words, it is a machine language (code) for JVM in the form of .class file, but it is not machine specific because
it is not a native code.
Characteristics of Java Bytecode
Java bytecode has two most important characteristics that are as follows:
• Byte code is independent of processor, i.e., Java program can be executed on any processor architecture.
• It does not depend on operating systems such as Windows, Linux, and Mac OS.
Advantages of Java Bytecode

Java Bytecode has mainly two advantages that are as follows:


1. Byte code makes the java program portable across the different hardware (processors) and operating system
platforms. The poly requirement is that Java Virtual Machine must be installed on them.
2. The second advantage is that it increases security of code because of control of JVM over the execution of byte code
file.
GITAM School of Technology
GITAM School of Technology
GITAM School of Technology
GITAM School of Technology
class Loader
ClassLoader:
• The ClassLoader is a part of the Java Runtime Environment (JRE) that dynamically loads Java class files from file
system, network or any other source into the Java Virtual Machine.
• It have three main phases :
 Loading
 Linking
 Initialization
Loading :
Is the part that is responsible of loading the byte code (.class file) from various resources (e.g. file system, jar file,
network socket) into memory.
The Load phase involve three different type of ClassLoader:
Bootstrap Class Loader: It loads JDK internal classes. It loads rt.jar and other core classes for example java.lang.* package
classes.
Extensions
GITAM Class of
School Loader: It loads classes from the JDK extensions directory, usually $JAVA_HOME/lib/ext directory.
Technology
JVM

For more Description

GITAM School of Technology


Program Compilation Process

GITAM School of Technology


Types of Code Blocks in
Java
• Conditional and Loop Blocks:
• Method Blocks:
if (age >= 18)
public void greet()
{
{
System.out.println("You are an adult.");
System.out.println("Hello, welcome!");
}
}
else
• Class Blocks:
{
public class MyClass
System.out.println("You are a minor.");
{
}
// Class block starts here
int number; • Benefits of Using Code Blocks
public void displayNumber() • Logical Grouping
{ • Scope Control:
System.out.println(number); • Flow Control:
}
// Class block ends here
}

GITAM School of Technology


Java
Keywords
• Keywords are reserved words in Java that have a predefined meaning and are used by the Java compiler to
understand the structure and actions of a program. Because they are reserved, you cannot use them as
identifiers (variable names, class names, etc.).

GITAM School of Technology


Java
Identifiers
• Identifiers are names given to elements in a Java program, such as classes, variables, methods, and objects. They
are user-defined names and must follow certain rules.
• Rules for Identifiers:
• Start with a Letter or Underscore
• No Reserved/Keywords
• Case-Sensitive
• No Special Characters
• Examples of Identifiers:
• MyClass (class name)
• myVariable (variable name)
• calSum (method name)

GITAM School of Technology


Java Class Libraries
• The Java Class Libraries (JCL) are an essential part of the Java Development Kit (JDK) and provide a
comprehensive collection of prewritten classes and interfaces.
• These libraries form the backbone of Java programming, offering functionality for common
programming tasks such as data structures, file manipulation, networking, multithreading, and more.
Key Components of the Java Class Libraries
1. Core Libraries: Provide fundamental classes and APIs required for most Java programs.
Key packages:
• java.lang: Core classes such as String, Math, Object, and Class.
• java.util: Utility classes for collections, date and time, and random number generation.
• java.io: Classes for input and output operations (e.g., file handling, streams).
• java.nio: Non-blocking I/O and file system operations.
• java.math: Classes for arbitrary-precision arithmetic (e.g., BigInteger, BigDecimal)
GITAM School of Technology
Java Class Libraries
2. Collection Framework: A set of classes and interfaces to store, manage, and manipulate groups of objects.
Key components:
• List: ArrayList, LinkedList
• Set: HashSet, TreeSet
• Map: HashMap, TreeMap
• Queue: PriorityQueue, Deque
3. Concurrency Libraries: Support for multithreaded and parallel programming.
Key classes:
• Thread, Runnable: Basic thread handling.
• java.util.concurrent: Classes for thread pools, locks, and concurrent collections (e.g., ExecutorService,
ConcurrentHashMap).

GITAM School of Technology


Java Built-in
Libraries

GITAM School of Technology


Java Built-in
Libraries

GITAM School of Technology


Thank You

GITAM School of Technology

You might also like