SlideShare a Scribd company logo
Java Review
Course Curriculum
 Module 1
» Java Basics
 Module 2
» Java Constructs
 Module 3
» OOP Concept
 Module 4
» Interfaces and Enums
 Module 5
» Dynamic Data Storage
 Module 6
» Threads
 Module 7
» Exception Handling
 Module 8
» Database & JDBC and Project
What is Java ?
• Java
- Java is not just a programming language but it is a complete
platform for object oriented programming.
• JRE
- Java standard class libraries which provide Application
Programming Interface and JVM together form JRE (Java Runtime
Environment).
• JDK
- JDK (Java development kit) provides all the needed support for
software development in Java.
Java Virtual Machine (JVM)
• Runs the Byte Code.
• Makes Java platform independent.
• Handles Memory Management.
Byte Code
• Java bytecode is the form of instructions that
the Java Virtual Machine executes
• A Java programmer does not need to be aware of or
understand Java bytecode at all.
• The model of computation of Java bytecode is that
of a stack oriented programming language.
Garbage Collection
• The programmer is not responsible for memory
management in Java.
• The memory area in JVM where objects are created
is called Heap.
• The memory is freed during runtime by a special
thread called Garbage Collector.
• The GC looks for objects which are no longer
needed by the program and destroys them.
Garbage Collection
Garbage Collection
Garbage Collection
Garbage Collection
How Java works ?
• Java compilers convert your code from human readable to
something called “bytecode” in the Java world.
• “Bytecode” is interpreted by a JVM, which operates much
like a physical CPU to actually execute the compiled code.
• Just-in-time (JIT) compiler is a program that turns
Java bytecode into instructions that can be sent directly to
the processor.
How Java works ?
Basic Java Syntax
Data Types in Java
• Data types define the nature of a value
• We need different data-types to handle real-world information
Name Size (in bits) Range
long 64 -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
int 32 –2,147,483,648 to 2,147,483,647
Short 16 –32,768 to 32,767
byte 8 –128 to 127
double 64 4.9e–324 to 1.8e+308
float 32 1.4e–045 to 3.4e+038
char 16 0 to 65,536
boolean ??
true/false
Primitive Types and Variables
• boolean, char, byte, short, int, long, float, double etc.
• These basic (or primitive) types are the only types that are
not objects (due to performance issues).
• This means that you don’t use the new operator to create
a primitive variable.
Naming Convention of Variables
• Can start with a letter, an underscore(_), or a dollar sign ($)
• Cannot start with a number.
 long _LongNumber = 9999999;
 String firstName = “John”;
 float $Val = 2.3f;
 int i, index = 2;
 double gamma = 1.2;
 boolean value2 = false;
Statements & Blocks
• A simple statement is a command terminated by a semi-colon:
name = “Fred”;
• A block is a compound statement enclosed in curly brackets:
{
name1 = “Fred”; name2 = “Bill”;
}
• Blocks may contain other blocks.
Flow of Control
• Java executes one statement after the other in the
order they are written.
• Many Java statements are flow control statements:
Alternation:
if, if else, switch
Java Basic Constructs
• If
• If…else
• Nested If…else
• Switch Statement
If else– Syntax
if ( <condition> )
{
// Execute these statements if <condition> is TRUE
}
If else– Syntax
if ( <condition> )
{
// Execute these statements if <condition> is TRUE
}
else
{
// Execute these statements if < condition> is FALSE
}
If else– Syntax
if ( <condition1> )
{
// Execute these statements if <condition1> is TRUE
} else if ( <condition2> )
{
// Execute these statements if <condition2> is TRUE
} else {
// if both <condition1> and <condition2> is FALSE
}
switch– Syntax
switch (expression)
{
case cond1:
block_1;
break;
case cond2:
block_2;
break;
...
default:
block_default;
}
Operators
• Provide a way to perform different operations on
variables
• Categories of Java Operators
Assignment Operators =
Arithmetic Operators - + * / %
Relational Operators > < >= <= == !=
Logical Operators && || & | ^
Unary Operators + - ++ -- !
Assignment and Arithmetic Operators
• Used to assign a value to a variable
• Syntax
– <variable> = <expression>
• Java provides eight Arithmetic operators:
– for addition, subtraction, multiplication, division, modulo (or
remainder), increment (or add 1), decrement (or subtract 1),
and negation.
Assignment Operator =
Relational Operators
• Used to compare two values.
• Binary operators, and their operands are numeric
expressions.
Relational Operators > < >= <= == !=
Logical Operators
• Return a true or false value based on the state of
the variables
• There are six logical operators
Conditional AND Conditional OR AND OR NOT Exclusive OR
Logical Operators && || & | ! ^
Static versus Non-static Variables
• Static variables are shared across all the objects of a
class
– There is only one copy
• Non-Static variables are not shared
– There is a separate copy for each individual live object.
• Static variables cannot be declared within a
method.
•Q& A..?
Thanks..!

More Related Content

PDF
Chapter 01 Introduction to Java by Tushar B Kute
PPTX
Android webinar class_java_review
PPTX
Java basics and java variables
PDF
Java Review
PPTX
Chapter 2 java
PPTX
Classes objects in java
PDF
Java basic concept
PPT
Core Java Programming | Data Type | operator | java Control Flow| Class 2
Chapter 01 Introduction to Java by Tushar B Kute
Android webinar class_java_review
Java basics and java variables
Java Review
Chapter 2 java
Classes objects in java
Java basic concept
Core Java Programming | Data Type | operator | java Control Flow| Class 2

What's hot (18)

PPTX
Static keyword ppt
PPT
Final keyword in java
DOCX
SQL Interview Questions For Experienced
PPTX
Constructor in java
PPT
3 java - variable type
PPTX
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
PDF
Java essentials for hadoop
PPTX
6. static keyword
PPT
Java static keyword
PDF
Java Variable Types
PPTX
Statics in java | Constructors | Exceptions in Java | String in java| class 3
PPTX
Introduction to Java
ODP
Preparing Java 7 Certifications
PPTX
Advanced Object-Oriented/SOLID Principles
PPTX
L2 datatypes and variables
PPTX
Java static keyword
PPT
Object Oriented Programming with Java
PPT
Data members and member functions
Static keyword ppt
Final keyword in java
SQL Interview Questions For Experienced
Constructor in java
3 java - variable type
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
Java essentials for hadoop
6. static keyword
Java static keyword
Java Variable Types
Statics in java | Constructors | Exceptions in Java | String in java| class 3
Introduction to Java
Preparing Java 7 Certifications
Advanced Object-Oriented/SOLID Principles
L2 datatypes and variables
Java static keyword
Object Oriented Programming with Java
Data members and member functions
Ad

Viewers also liked (14)

PPTX
Java class 7
PPTX
Java class 1
PPTX
Java class 8
PPTX
Java class 4
PPTX
Java class 5
PPTX
Java class 3
PPTX
Java class 6
PDF
Chapter 1. java programming language overview
PDF
Java basics
PDF
Java keywords
PPTX
Introduction to Information Technology (IT)
PPTX
What Is Salesforce CRM? | Salesforce CRM Tutorial For Beginners | Salesforce ...
PDF
Introduction to Java Programming Language
PPTX
Latest trends in information technology
Java class 7
Java class 1
Java class 8
Java class 4
Java class 5
Java class 3
Java class 6
Chapter 1. java programming language overview
Java basics
Java keywords
Introduction to Information Technology (IT)
What Is Salesforce CRM? | Salesforce CRM Tutorial For Beginners | Salesforce ...
Introduction to Java Programming Language
Latest trends in information technology
Ad

Similar to Java (20)

PDF
Introduction to java (revised)
PPTX
UNIT – 2 Features of java- (Shilpa R).pptx
PPTX
Java Basics.pptx from nit patna ece department
PPTX
Java basic
PPTX
Programming in java basics
PPTX
Learn To Code: Introduction to java
PPTX
Assignmentjsnsnshshusjdnsnshhzudjdndndjd
PDF
Unit 1 Core Java for Compter Science 3rd
PPTX
Java 101 intro to programming with java
PPTX
Java 101 Intro to Java Programming
PPTX
Scala-Ls1
PPTX
ppt_on_java.pptx
PPTX
JAVA in Artificial intelligent
PPTX
java in Aartificial intelligent by virat andodariya
PPTX
Learning core java
PPTX
FFW Gabrovo PMG - JavaScript 1
PPTX
imperative programming language, java, android
 
PPTX
Java platform
PPTX
Java 101
Introduction to java (revised)
UNIT – 2 Features of java- (Shilpa R).pptx
Java Basics.pptx from nit patna ece department
Java basic
Programming in java basics
Learn To Code: Introduction to java
Assignmentjsnsnshshusjdnsnshhzudjdndndjd
Unit 1 Core Java for Compter Science 3rd
Java 101 intro to programming with java
Java 101 Intro to Java Programming
Scala-Ls1
ppt_on_java.pptx
JAVA in Artificial intelligent
java in Aartificial intelligent by virat andodariya
Learning core java
FFW Gabrovo PMG - JavaScript 1
imperative programming language, java, android
 
Java platform
Java 101

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Python Programming Tutorial | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
Introduction to DevOps | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Python Programming Tutorial | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
Introduction to DevOps | Edureka

Recently uploaded (20)

PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Lesson notes of climatology university.
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Pharma ospi slides which help in ospi learning
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Institutional Correction lecture only . . .
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
TR - Agricultural Crops Production NC III.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Lesson notes of climatology university.
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Computing-Curriculum for Schools in Ghana
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
01-Introduction-to-Information-Management.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Microbial diseases, their pathogenesis and prophylaxis
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Pharma ospi slides which help in ospi learning
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
GDM (1) (1).pptx small presentation for students
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Institutional Correction lecture only . . .

Java

  • 2. Course Curriculum  Module 1 » Java Basics  Module 2 » Java Constructs  Module 3 » OOP Concept  Module 4 » Interfaces and Enums  Module 5 » Dynamic Data Storage  Module 6 » Threads  Module 7 » Exception Handling  Module 8 » Database & JDBC and Project
  • 3. What is Java ? • Java - Java is not just a programming language but it is a complete platform for object oriented programming. • JRE - Java standard class libraries which provide Application Programming Interface and JVM together form JRE (Java Runtime Environment). • JDK - JDK (Java development kit) provides all the needed support for software development in Java.
  • 4. Java Virtual Machine (JVM) • Runs the Byte Code. • Makes Java platform independent. • Handles Memory Management.
  • 5. Byte Code • Java bytecode is the form of instructions that the Java Virtual Machine executes • A Java programmer does not need to be aware of or understand Java bytecode at all. • The model of computation of Java bytecode is that of a stack oriented programming language.
  • 6. Garbage Collection • The programmer is not responsible for memory management in Java. • The memory area in JVM where objects are created is called Heap. • The memory is freed during runtime by a special thread called Garbage Collector. • The GC looks for objects which are no longer needed by the program and destroys them.
  • 11. How Java works ? • Java compilers convert your code from human readable to something called “bytecode” in the Java world. • “Bytecode” is interpreted by a JVM, which operates much like a physical CPU to actually execute the compiled code. • Just-in-time (JIT) compiler is a program that turns Java bytecode into instructions that can be sent directly to the processor.
  • 14. Data Types in Java • Data types define the nature of a value • We need different data-types to handle real-world information Name Size (in bits) Range long 64 -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 int 32 –2,147,483,648 to 2,147,483,647 Short 16 –32,768 to 32,767 byte 8 –128 to 127 double 64 4.9e–324 to 1.8e+308 float 32 1.4e–045 to 3.4e+038 char 16 0 to 65,536 boolean ?? true/false
  • 15. Primitive Types and Variables • boolean, char, byte, short, int, long, float, double etc. • These basic (or primitive) types are the only types that are not objects (due to performance issues). • This means that you don’t use the new operator to create a primitive variable.
  • 16. Naming Convention of Variables • Can start with a letter, an underscore(_), or a dollar sign ($) • Cannot start with a number.  long _LongNumber = 9999999;  String firstName = “John”;  float $Val = 2.3f;  int i, index = 2;  double gamma = 1.2;  boolean value2 = false;
  • 17. Statements & Blocks • A simple statement is a command terminated by a semi-colon: name = “Fred”; • A block is a compound statement enclosed in curly brackets: { name1 = “Fred”; name2 = “Bill”; } • Blocks may contain other blocks.
  • 18. Flow of Control • Java executes one statement after the other in the order they are written. • Many Java statements are flow control statements: Alternation: if, if else, switch
  • 19. Java Basic Constructs • If • If…else • Nested If…else • Switch Statement
  • 20. If else– Syntax if ( <condition> ) { // Execute these statements if <condition> is TRUE }
  • 21. If else– Syntax if ( <condition> ) { // Execute these statements if <condition> is TRUE } else { // Execute these statements if < condition> is FALSE }
  • 22. If else– Syntax if ( <condition1> ) { // Execute these statements if <condition1> is TRUE } else if ( <condition2> ) { // Execute these statements if <condition2> is TRUE } else { // if both <condition1> and <condition2> is FALSE }
  • 23. switch– Syntax switch (expression) { case cond1: block_1; break; case cond2: block_2; break; ... default: block_default; }
  • 24. Operators • Provide a way to perform different operations on variables • Categories of Java Operators Assignment Operators = Arithmetic Operators - + * / % Relational Operators > < >= <= == != Logical Operators && || & | ^ Unary Operators + - ++ -- !
  • 25. Assignment and Arithmetic Operators • Used to assign a value to a variable • Syntax – <variable> = <expression> • Java provides eight Arithmetic operators: – for addition, subtraction, multiplication, division, modulo (or remainder), increment (or add 1), decrement (or subtract 1), and negation. Assignment Operator =
  • 26. Relational Operators • Used to compare two values. • Binary operators, and their operands are numeric expressions. Relational Operators > < >= <= == !=
  • 27. Logical Operators • Return a true or false value based on the state of the variables • There are six logical operators Conditional AND Conditional OR AND OR NOT Exclusive OR Logical Operators && || & | ! ^
  • 28. Static versus Non-static Variables • Static variables are shared across all the objects of a class – There is only one copy • Non-Static variables are not shared – There is a separate copy for each individual live object. • Static variables cannot be declared within a method.