Welcome To The Java and OOPS Course
Welcome To The Java and OOPS Course
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.
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.
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.
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.