SlideShare a Scribd company logo
Java Essentials for Hadoop
Agenda
What is Java ?
Features of Java
How Java Works
Java Data Types
Java Operators
Statements & Blocks in Java
Java Class
Java Basic Constructs
Creating an Object
Arrays
What is Java ?
Java is a high level programming language
developed by Sun Microsystems and
released in November 1995.
Java can be used to create complete
applications that may run on a single
computer or be distributed among servers
and clients in a network.
Java is Object-Oriented and follows the
principal of “write once run anywhere”
codes.
Features of Java
Simple
Object Oriented
Multithreaded
Distributed
Platform Independent
Secure
Robust
What is JDK and JRE ?
JDK
+
Development
tools
 Compiler
 Debugger
JRE
JVM
Utility
Classes
How Java Works ?
Source
Code
Byte
Code
JVM
JIT Compiler
Java
Interpreter
Runtime
System
Output of
the
program
Java Compiler
Hexadecimal format
It is used to speed up the execution
Converts total byte code
into machine code
Data Types
Data Type Size Default value
Boolean 1 bit False
char 2 bytes 'u0000'
byte 1 byte 0
short 2 bytes 0
int 4 bytes 0
long 8 bytes 0L
float 4 bytes 0.0f
double 8 bytes 0.0d
String(any object) - null
Primitive Data Types
Non-primitive Data Types
(Reference type)
1. Class Type
2. Interface Type
3. Array type
Operators
Provide a way to perform different operations on variables.
Operator Type operators
Assignment =
Arithmetic + , - , * , /
Relational < , > , <= , >= , == , !=
Logical && , || , !
Bitwise &, |, ^, >>, <<
Unary ++ , --, +, -, !
Statements & Blocks in JAVA
Statements are always terminated by
a semi-colon(;)
A block is a compound
statement enclosed in curly
brackets.
Statement forms a complete
command to be executed.
class Stat
{
Boolean flag ; //statement 1
Int x = 20 ; //Statement 2
.
.
}
Open braces for a block
End of block, using close braces
A class can be defined as a template/blue print that describes the
behaviors and states that object of its type support.
Objects have states and behaviors.
Example: Bicycles have state (current gear, current pedal cadence, two wheels,
number of gears) and behavior (braking, accelerating, slowing down, changing gears).
An object is an instance of a class.
Java Class
Example of a class
public class hello {
public static void main(String[] args)
{
int number = 10; //variable
System.out.println("Hello");
System.out.println(number);
}
}
class Myclass
{
//data members
//constructors
// methods or member functions
}
Method
Public static void myFunction(arg1, arg2, arg3)
{
}
Modifier
Java keyword
return type
function name
Any number of
arguments
//Body of the method
Public
• Can be accessed from anywhere.
Protected
• Can be accessed in the same package or any derived
class.
Default
• Can be accessed within the class only.
Private
• Can be accessed within the same package.
Modifiers
Java Basic Constructs
If…else case
Switch Case
Loops in Java – for loop, while loop,
do while loop
If Else - Syntax
If (condition)
{
Statements
}
else
{
Statements
}
Statements
true
false
condition
Switch - Syntax
Switch(x)
{
Case 1:
Statements
Case 2:
Statements
default :
Statements
}
Case 1
Statements
Statements
Case 2
true
false
true
false
default
End of the switch
Statement
For Loop - Syntax
for (initialization;
condition;
increment/decrement;)
{
statement 1;
statement 2;
…
}
Initialization
Inside the for loop
true
false
Increment/
decrement
End of for loop
condition
While Loop - Syntax
while (<condition>)
{
statement1;
…
}
Initialization
Inside the for loop
true
false
Increment/
decrement
End of for loop
condition
Do While Loop Syntax
do
{
statement 1;
statement 2;
……
} while (<condition>) ;
Initialization
Inside the do while loop
true
false
Increment/
decrement
End of for loop
condition
condition
Creation of the Object
Class_name object_name = new class_name();
Name of the class
Creates a reference object
Allocate memory
Constructor of the class
Creates a new object
An array is a list of similar elements.
An array has a fixed:
- name
- type
- length
These must be declared when the array is created.
Array size cannot be changed during the execution
of the code.
Arrays
Java essentials for hadoop

More Related Content

DOCX
Java interview questions and answers for cognizant By Data Council Pune
PPSX
Core java lessons
PPTX
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
PPT
Hibernate introduction
PPTX
Constructors in java
PDF
Java
PPTX
Java class 1
PPTX
Introduction to Object Oriented Concepts
Java interview questions and answers for cognizant By Data Council Pune
Core java lessons
Java Class 6 | Java Class 6 |Threads in Java| Applets | Swing GUI | JDBC | Ac...
Hibernate introduction
Constructors in java
Java
Java class 1
Introduction to Object Oriented Concepts

What's hot (19)

PPTX
Lecture - 1 introduction to java
PPT
Java static keyword
PPTX
Core java
PPTX
Java 102 intro to object-oriented programming in java
PPTX
Java 101 Intro to Java Programming
PDF
Basic Java Programming
PPTX
6. static keyword
PDF
Java keywords
PPTX
Java static keyword
PPT
Object Oriented Programming with Java
PPTX
Java basic
PPTX
Core Java introduction | Basics | free course
PPTX
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
PPTX
Core java
PPTX
Unit3 part3-packages and interfaces
PPTX
PPT
Basics of java programming language
PPTX
Local variables Instance variables Class/static variables
PPTX
Basics of Java
Lecture - 1 introduction to java
Java static keyword
Core java
Java 102 intro to object-oriented programming in java
Java 101 Intro to Java Programming
Basic Java Programming
6. static keyword
Java keywords
Java static keyword
Object Oriented Programming with Java
Java basic
Core Java introduction | Basics | free course
JavaOne 2014 - CON2013 - Code Generation in the Java Compiler: Annotation Pro...
Core java
Unit3 part3-packages and interfaces
Basics of java programming language
Local variables Instance variables Class/static variables
Basics of Java
Ad

Similar to Java essentials for hadoop (20)

PPT
Introduction to java
PDF
Introduction java programming
PPTX
oop unit1.pptx
PPTX
Object Oriented Programming unit 1 content for students
PPTX
Java Technologies notes of unit 1 and 2.
PDF
Java programming basics
PPTX
JAVA AND OOPS CONCEPTS.pptx helpful for engineering
PPTX
Unit 1 – Introduction to Java- (Shilpa R).pptx
PPTX
2. Introduction to Java for engineering stud
PDF
Unit 1 Core Java for Compter Science 3rd
PPTX
Module 1.pptx
PPTX
DAY_1.1.pptx
PPT
Basic java part_ii
PDF
Core Java Interview Questions PDF By ScholarHat
PDF
Java programming material for beginners by Nithin, VVCE, Mysuru
PPTX
Java-1st.pptx about Java technology before oops
PPT
SMI - Introduction to Java
PPTX
Manuel - SPR - Intro to Java Language_2016
Introduction to java
Introduction java programming
oop unit1.pptx
Object Oriented Programming unit 1 content for students
Java Technologies notes of unit 1 and 2.
Java programming basics
JAVA AND OOPS CONCEPTS.pptx helpful for engineering
Unit 1 – Introduction to Java- (Shilpa R).pptx
2. Introduction to Java for engineering stud
Unit 1 Core Java for Compter Science 3rd
Module 1.pptx
DAY_1.1.pptx
Basic java part_ii
Core Java Interview Questions PDF By ScholarHat
Java programming material for beginners by Nithin, VVCE, Mysuru
Java-1st.pptx about Java technology before oops
SMI - Introduction to Java
Manuel - SPR - Intro to Java Language_2016
Ad

More from KCC Software Ltd. & Easylearning.guru (11)

PPTX
Python GUI Course Summary - 7 Modules
PPTX
Prerequisites of Bootstrap
PPTX
Bootstrap Self-paced Cousre Syllabus
PPTX
10 Keynotes in STRATA and HADOOP World Conference
PDF
Mongodb tutorial at Easylearning Guru
PPTX
Online MongoDB Training by Easylearning.guru
PPTX
Big Data Hadoop Tutorial by Easylearning Guru
PDF
Big Data Hadoop Training by Easylearning Guru
PPTX
Python Online From EasyLearning Guru
PPTX
Easylearning Guru online Hadoop class
Python GUI Course Summary - 7 Modules
Prerequisites of Bootstrap
Bootstrap Self-paced Cousre Syllabus
10 Keynotes in STRATA and HADOOP World Conference
Mongodb tutorial at Easylearning Guru
Online MongoDB Training by Easylearning.guru
Big Data Hadoop Tutorial by Easylearning Guru
Big Data Hadoop Training by Easylearning Guru
Python Online From EasyLearning Guru
Easylearning Guru online Hadoop class

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
RMMM.pdf make it easy to upload and study
PDF
Insiders guide to clinical Medicine.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Computing-Curriculum for Schools in Ghana
Supply Chain Operations Speaking Notes -ICLT Program
PPH.pptx obstetrics and gynecology in nursing
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Anesthesia in Laparoscopic Surgery in India
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
GDM (1) (1).pptx small presentation for students
RMMM.pdf make it easy to upload and study
Insiders guide to clinical Medicine.pdf

Java essentials for hadoop

  • 2. Agenda What is Java ? Features of Java How Java Works Java Data Types Java Operators Statements & Blocks in Java Java Class Java Basic Constructs Creating an Object Arrays
  • 3. What is Java ? Java is a high level programming language developed by Sun Microsystems and released in November 1995. Java can be used to create complete applications that may run on a single computer or be distributed among servers and clients in a network. Java is Object-Oriented and follows the principal of “write once run anywhere” codes.
  • 4. Features of Java Simple Object Oriented Multithreaded Distributed Platform Independent Secure Robust
  • 5. What is JDK and JRE ? JDK + Development tools  Compiler  Debugger JRE JVM Utility Classes
  • 6. How Java Works ? Source Code Byte Code JVM JIT Compiler Java Interpreter Runtime System Output of the program Java Compiler Hexadecimal format It is used to speed up the execution Converts total byte code into machine code
  • 7. Data Types Data Type Size Default value Boolean 1 bit False char 2 bytes 'u0000' byte 1 byte 0 short 2 bytes 0 int 4 bytes 0 long 8 bytes 0L float 4 bytes 0.0f double 8 bytes 0.0d String(any object) - null Primitive Data Types Non-primitive Data Types (Reference type) 1. Class Type 2. Interface Type 3. Array type
  • 8. Operators Provide a way to perform different operations on variables. Operator Type operators Assignment = Arithmetic + , - , * , / Relational < , > , <= , >= , == , != Logical && , || , ! Bitwise &, |, ^, >>, << Unary ++ , --, +, -, !
  • 9. Statements & Blocks in JAVA Statements are always terminated by a semi-colon(;) A block is a compound statement enclosed in curly brackets. Statement forms a complete command to be executed. class Stat { Boolean flag ; //statement 1 Int x = 20 ; //Statement 2 . . } Open braces for a block End of block, using close braces
  • 10. A class can be defined as a template/blue print that describes the behaviors and states that object of its type support. Objects have states and behaviors. Example: Bicycles have state (current gear, current pedal cadence, two wheels, number of gears) and behavior (braking, accelerating, slowing down, changing gears). An object is an instance of a class. Java Class
  • 11. Example of a class public class hello { public static void main(String[] args) { int number = 10; //variable System.out.println("Hello"); System.out.println(number); } } class Myclass { //data members //constructors // methods or member functions }
  • 12. Method Public static void myFunction(arg1, arg2, arg3) { } Modifier Java keyword return type function name Any number of arguments //Body of the method
  • 13. Public • Can be accessed from anywhere. Protected • Can be accessed in the same package or any derived class. Default • Can be accessed within the class only. Private • Can be accessed within the same package. Modifiers
  • 14. Java Basic Constructs If…else case Switch Case Loops in Java – for loop, while loop, do while loop
  • 15. If Else - Syntax If (condition) { Statements } else { Statements } Statements true false condition
  • 16. Switch - Syntax Switch(x) { Case 1: Statements Case 2: Statements default : Statements } Case 1 Statements Statements Case 2 true false true false default End of the switch Statement
  • 17. For Loop - Syntax for (initialization; condition; increment/decrement;) { statement 1; statement 2; … } Initialization Inside the for loop true false Increment/ decrement End of for loop condition
  • 18. While Loop - Syntax while (<condition>) { statement1; … } Initialization Inside the for loop true false Increment/ decrement End of for loop condition
  • 19. Do While Loop Syntax do { statement 1; statement 2; …… } while (<condition>) ; Initialization Inside the do while loop true false Increment/ decrement End of for loop condition condition
  • 20. Creation of the Object Class_name object_name = new class_name(); Name of the class Creates a reference object Allocate memory Constructor of the class Creates a new object
  • 21. An array is a list of similar elements. An array has a fixed: - name - type - length These must be declared when the array is created. Array size cannot be changed during the execution of the code. Arrays