Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
23 views

Welcome To The Java and OOPS Course

This document provides an introduction to programming paradigms and Java. It discusses imperative, procedural, object-oriented, declarative, and functional programming paradigms. It then introduces Java, describing how Java code is compiled to bytecode and run on the Java Virtual Machine (JVM). It explains that the JDK is for development, the JRE runs programs, and the JVM interprets bytecode. Finally, it outlines the JVM loading, class loading, verification, just-in-time compilation, and execution processes.

Uploaded by

Divyanshi Bajpai
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Welcome To The Java and OOPS Course

This document provides an introduction to programming paradigms and Java. It discusses imperative, procedural, object-oriented, declarative, and functional programming paradigms. It then introduces Java, describing how Java code is compiled to bytecode and run on the Java Virtual Machine (JVM). It explains that the JDK is for development, the JRE runs programs, and the JVM interprets bytecode. Finally, it outlines the JVM loading, class loading, verification, just-in-time compilation, and execution processes.

Uploaded by

Divyanshi Bajpai
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Welcome to

the Java and


OOPS Course
Evolution of Programming
Paradigms
What exactly is Programming
Paradigm?
 Paradigm can also be termed as method to solve some problem or do some
task.
Programming paradigm is an approach to solve problem using some
programming language or also we can say it is a method to solve a problem using
tools and techniques that are available to us following some approach.
There are lots for programming language that are known but all of them need to
follow some strategy when they are implemented and this methodology/strategy
is paradigms.
Imperative Programming:tells the
computer how to do any task by giving a set of commands
or instruction in particular order.

Procedural Programming: Object Oriented Porgramming:

1. Divided into small parts called 1. Divided into small parts called Object.
functions. 2. Follows a bottom-up approach involving
object invoking.
2. Follows a top down approach in
function calling. 3. Needs more memory.

3. Needs less memory than OOPS. 4. More Secure than PP as it follows


abstraction.
4. Less Secure
5. Example: C++,Python,Java etc.
5. Example: C,Pascal,Fortran,VB
Declarative programming:programming paradigm that
focuses on expressing the desired behavior of a program without explicitly
specifying the steps to achieve that behavior. Instead of giving a sequence of
instructions, you describe what you want the program to do, and the underlying
system figures out how to achieve it.

Functional Programming: Logical Programming:


1. Focuses on the evaluation of mathematical 1. Uses logic-based statements to express
functions and avoids changing state and mutable relationships and constraints. Examples
data. Examples include Haskell, Lisp, and Scala. include Prolog and Datalog.

2. Imagine you have a bunch of tools (functions) 2. Think of this like solving puzzles with a set of
that can take some stuff (data) and transform it rules. You have a bunch of clues (logical rules)
into something else. These tools don't change the and a puzzle board (data). You apply the rules
original stuff; they make new stuff based on the to the board and fill in the missing pieces. If a
old stuff. And guess what? These tools always rule contradicts something you filled in earlier,
work the same way for the same stuff you give you backtrack and try a different piece. It's like
them. No surprises! playing detective to figure out what fits where!
Introduction
to Java:
 Java is a purely Object Oriented
Porgramming language created
by James Gosling at Sun
Microsystems in 1991.

 Java is compiled into Bytecode


from source code and then
interpreted to Machine Code.
Introduction to JVM
Architecture!

T
JDK,JRE & JVM
JDK(JAVA DEVELOPMENT KIT): For Java developers. It includes development
tools, libraries, and the ability to compile and run Java programs.
JRE(JAVA RUNTIME ENVIRONMENT):Helps in executing programs in Java.It
include JVM and standard libraries.
JVM(JAVA VIRTUAL MACHINE): The JVM is the runtime environment where
Java bytecode is executed. It acts as an interpreter for the compiled Java bytecode,
translating it into machine code that your computer's operating system can
understand. The JVM is responsible for managing memory, handling garbage
collection (releasing memory that's no longer needed), and providing the runtime
environment for Java applications to run.
LETS DIVE A BIT DEEPER INTO
JVM!
1. Loading:
The JVM reads and brings in the compiled Java code, known as bytecode,
from .class files.

2. Class Loader:
The class loader handles the process of loading classes into the memory of the
JVM for execution.
3. Bytecode Verification:
The JVM ensures that the bytecode is valid and safe, checking for compliance with Java's
rules. This helps prevent potential issues during execution.

4. Just-In-Time (JIT) Compilation:


For parts of the program used frequently, the JVM translates the bytecode into machine
code in real-time using the JIT compiler. This optimized code execution speeds up
performance.

5. Execution:
With bytecode prepared, verified, and optionally compiled, the JVM guides the program's
operation by following the bytecode instructions step by step, managing memory and
resources along the way.

You might also like