SlideShare a Scribd company logo
1 of 19
Fundamentals of Java




  Presenting overview of java




     Presented by
     Uday Sharma                1
Fundamentals of Java

• Key Skills & Concepts
  • History of java
  • Importance of bytecode
  • Java Buzzword
  • Java development kit
  • IDE installation
  • First simple program
  • Second simple program
  • Data types
  • Project work
  • Control statement
  • Sample program
  • Project work
                                     2
History of Java


                       Get_renamed
                        Year_1995

       Oak                                          Java




Java mainly invented for Embedded System to create software
for Microwave Ovens, Remote Controls and Toaster              3
C++ vs. Java

 Java easier then the C++. We can learn Java without having
 knowldege of C++

C++                                 Java
• Multiple Inheritance              • No multiple Inheritance
• Pointer                           • No pointer
• Operator overloading              • No operator overloading
• Friend function                   • No friend function
• Main method outside of class      • Main method inside the class
• Malloc and calloc for memory      • No malloc and calloc memory
  management                           fixed


                                                              4
Java Bytecode

• Javac command generate
  .class file
• Interpreter generate bytecode
  and pass to the JVM
• JVM helps to run the code on
  operating system




                                      5
Java Buzzword




                6
Download JAVA SDK

http://www.oracle.com/technetwork/java/javase/downloads/index.
html --- For Download Java SDK

http://www.eclipse.org/downloads/ -- For download IDE




                                                             7
Set Environment Variable
1. Right click on      3. Select Advanced   4. Click on Environment
Computer               system settings      variable




2. Select properties




                                                               8
Set Environment Variable
JAVA_HOME System variable




                                     9
Set Environment Variable
JAVA_BIN variable




                                    10
Eclipse IDE

• Providing environment to write multiple programming language
  code (E.g. Java, php, python, c, c++ and etc.)

• We can easily design models (e.g. UML, XSD and etc.)

• Easily integrate third pary library in our code (e.g. Facebook API,
  Twitter API, dropbox API and etc.)

• Eclipse helps to make test driven application




                                                                    11
Sample Java code

/*
This is a simple Java program.
Call this file Example.java.
*/
class Example {
// A Java program begins with a call to main().
public static void main(String args[]) {
System.out.println("Java drives the Web.");
}
}


                                                  12
Execute Java code

You will follow these three steps:
1. Enter the program
>> CD C://path

2. Compile the program
C://path>> Javac helloworld.java

3. Run the program
C://path>> java helloworld



                                      13
Data types in Java
Data Type                Default Value (for fields)
byte                     0 -- 8– bit
short                    0 -- 8– bit
int                      0 -- 32 – bit
long                     0L – 64– bit
float                    0.0f -- 32-bit
double                   0.0d – 64- bit
char                     'u0000‘ – 16- bit
String (or any object)   null
boolean                  false – (True and false)


                                                      14
Arithmatic operator

Arithmetic Operators
• + Additive operator (also used for String concatenation)
• - Subtraction operator
• * Multiplication operator
• / Division operator
• % Remainder operator




                                                             15
Java Example

• Addition of two integer Number
• Subtraction of two integer Number
• Division of two integer Number
• Multiplication of two integer Number
• Modulus of two integer Number




                                         16
Group work

Design and build a code for simple arithmatic operation
calculator




                                                          17
Java comparision
                        operator
Equality and Relational Operators
• == Equal to
• != Not equal to
• > Greater than
• >= Greater than or equal to
• < Less than
• <= Less than or equal to
Conditional Operators
• && Conditional-AND
• || Conditional-OR
• ?: Ternary (shorthand for if-then-else statement)

                                                      18
References

• [<Java For Beginners> <homeandlearn>
  http://www.homeandlearn.co.uk/java/java.html
  <Date><Publish>]
• [<Java A Beginner’s Guide> <Herbert schildt>
  http://www.mhprofessional.com/downloads/product
  s/0071606327/01-ch01_6327.pdf <Date><McGraw-
  Hill> ]




                                                    19

More Related Content

What's hot

Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...Edureka!
 
Java ain't scary - introducing Java to PL/SQL Developers
Java ain't scary - introducing Java to PL/SQL DevelopersJava ain't scary - introducing Java to PL/SQL Developers
Java ain't scary - introducing Java to PL/SQL DevelopersLucas Jellema
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaEdureka!
 
Advanced java
Advanced java Advanced java
Advanced java NA
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVAHome
 
Java basic-tutorial for beginners
Java basic-tutorial for beginners Java basic-tutorial for beginners
Java basic-tutorial for beginners Muzammil Ali
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javajayc8586
 
Deserialization vulnerabilities
Deserialization vulnerabilitiesDeserialization vulnerabilities
Deserialization vulnerabilitiesGreenD0g
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevMattias Karlsson
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules uploadRyan Cuprak
 
1 Introduction To Java Technology
1 Introduction To Java Technology 1 Introduction To Java Technology
1 Introduction To Java Technology dM Technologies
 
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...Edureka!
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming Saravanakumar R
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introductionjyoti_lakhani
 

What's hot (19)

Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
Java Threads Tutorial | Multithreading In Java Tutorial | Java Tutorial For B...
 
Java ain't scary - introducing Java to PL/SQL Developers
Java ain't scary - introducing Java to PL/SQL DevelopersJava ain't scary - introducing Java to PL/SQL Developers
Java ain't scary - introducing Java to PL/SQL Developers
 
History of java'
History of java'History of java'
History of java'
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | EdurekaWhat Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
What Is Java | Java Tutorial | Java Programming | Learn Java | Edureka
 
Basic java tutorial
Basic java tutorialBasic java tutorial
Basic java tutorial
 
Advanced java
Advanced java Advanced java
Advanced java
 
PROGRAMMING IN JAVA
PROGRAMMING IN JAVAPROGRAMMING IN JAVA
PROGRAMMING IN JAVA
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
 
Java basic-tutorial for beginners
Java basic-tutorial for beginners Java basic-tutorial for beginners
Java basic-tutorial for beginners
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Deserialization vulnerabilities
Deserialization vulnerabilitiesDeserialization vulnerabilities
Deserialization vulnerabilities
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Java basic
Java basicJava basic
Java basic
 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
 
1 Introduction To Java Technology
1 Introduction To Java Technology 1 Introduction To Java Technology
1 Introduction To Java Technology
 
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
 
Introduction to Java Programming
Introduction to Java Programming Introduction to Java Programming
Introduction to Java Programming
 
1 java programming- introduction
1  java programming- introduction1  java programming- introduction
1 java programming- introduction
 

Similar to Fundamentals of java --- version 2

1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptxBhargaviDalal3
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basicstosine
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operatorkamal kotecha
 
JavaFX - Sketch Board to Production
JavaFX - Sketch Board to ProductionJavaFX - Sketch Board to Production
JavaFX - Sketch Board to ProductionYoav Aharoni
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentationjuliasceasor
 
Introduction to java
Introduction to java Introduction to java
Introduction to java Java Lover
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorialjackschitze
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to javaattiqrocket
 
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»DataArt
 

Similar to Fundamentals of java --- version 2 (20)

Java introduction
Java introductionJava introduction
Java introduction
 
1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx1 Module 1 Introduction.pptx
1 Module 1 Introduction.pptx
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basics
 
basic core java up to operator
basic core java up to operatorbasic core java up to operator
basic core java up to operator
 
JavaFX - Sketch Board to Production
JavaFX - Sketch Board to ProductionJavaFX - Sketch Board to Production
JavaFX - Sketch Board to Production
 
Java goes wild, lesson 1
Java goes wild, lesson 1Java goes wild, lesson 1
Java goes wild, lesson 1
 
JavaClassPresentation
JavaClassPresentationJavaClassPresentation
JavaClassPresentation
 
Java Introduction
Java IntroductionJava Introduction
Java Introduction
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Java introduction
Java introductionJava introduction
Java introduction
 
Introduction to java programming tutorial
Introduction to java programming   tutorialIntroduction to java programming   tutorial
Introduction to java programming tutorial
 
Lesson1 intro
Lesson1 introLesson1 intro
Lesson1 intro
 
Lesson1 intro
Lesson1 introLesson1 intro
Lesson1 intro
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
1.Intro--Why Java.pptx
1.Intro--Why Java.pptx1.Intro--Why Java.pptx
1.Intro--Why Java.pptx
 
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
Станислав Сидоренко «DeviceHive Java Server – миграция на Spring Boot»
 
01 java intro
01 java intro01 java intro
01 java intro
 
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptxJAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
JAVA PROGRAM CONSTRUCTS OR LANGUAGE BASICS.pptx
 
CS8392 OOP
CS8392 OOPCS8392 OOP
CS8392 OOP
 
oop unit1.pptx
oop unit1.pptxoop unit1.pptx
oop unit1.pptx
 

More from Uday Sharma

Tftp client server communication
Tftp client server communicationTftp client server communication
Tftp client server communicationUday Sharma
 
Wat question papers
Wat question papersWat question papers
Wat question papersUday Sharma
 
Exercises of java tutoring -version1
Exercises of java tutoring -version1Exercises of java tutoring -version1
Exercises of java tutoring -version1Uday Sharma
 
Java tutor oo ps introduction-version 1
Java tutor  oo ps introduction-version 1Java tutor  oo ps introduction-version 1
Java tutor oo ps introduction-version 1Uday Sharma
 
Logistics final prefinal
Logistics final prefinalLogistics final prefinal
Logistics final prefinalUday Sharma
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel ProgrammingUday Sharma
 
Making Rules Project Management
Making Rules  Project ManagementMaking Rules  Project Management
Making Rules Project ManagementUday Sharma
 
Intelligent Weather Service
Intelligent Weather Service Intelligent Weather Service
Intelligent Weather Service Uday Sharma
 
India presentation
India presentationIndia presentation
India presentationUday Sharma
 

More from Uday Sharma (11)

Tftp client server communication
Tftp client server communicationTftp client server communication
Tftp client server communication
 
Wat question papers
Wat question papersWat question papers
Wat question papers
 
Core java
Core javaCore java
Core java
 
Exercises of java tutoring -version1
Exercises of java tutoring -version1Exercises of java tutoring -version1
Exercises of java tutoring -version1
 
Java tutor oo ps introduction-version 1
Java tutor  oo ps introduction-version 1Java tutor  oo ps introduction-version 1
Java tutor oo ps introduction-version 1
 
Logistics final prefinal
Logistics final prefinalLogistics final prefinal
Logistics final prefinal
 
Presentation1
Presentation1Presentation1
Presentation1
 
Parallel Programming
Parallel ProgrammingParallel Programming
Parallel Programming
 
Making Rules Project Management
Making Rules  Project ManagementMaking Rules  Project Management
Making Rules Project Management
 
Intelligent Weather Service
Intelligent Weather Service Intelligent Weather Service
Intelligent Weather Service
 
India presentation
India presentationIndia presentation
India presentation
 

Fundamentals of java --- version 2

  • 1. Fundamentals of Java Presenting overview of java Presented by Uday Sharma 1
  • 2. Fundamentals of Java • Key Skills & Concepts • History of java • Importance of bytecode • Java Buzzword • Java development kit • IDE installation • First simple program • Second simple program • Data types • Project work • Control statement • Sample program • Project work 2
  • 3. History of Java Get_renamed Year_1995 Oak Java Java mainly invented for Embedded System to create software for Microwave Ovens, Remote Controls and Toaster 3
  • 4. C++ vs. Java Java easier then the C++. We can learn Java without having knowldege of C++ C++ Java • Multiple Inheritance • No multiple Inheritance • Pointer • No pointer • Operator overloading • No operator overloading • Friend function • No friend function • Main method outside of class • Main method inside the class • Malloc and calloc for memory • No malloc and calloc memory management fixed 4
  • 5. Java Bytecode • Javac command generate .class file • Interpreter generate bytecode and pass to the JVM • JVM helps to run the code on operating system 5
  • 7. Download JAVA SDK http://www.oracle.com/technetwork/java/javase/downloads/index. html --- For Download Java SDK http://www.eclipse.org/downloads/ -- For download IDE 7
  • 8. Set Environment Variable 1. Right click on 3. Select Advanced 4. Click on Environment Computer system settings variable 2. Select properties 8
  • 11. Eclipse IDE • Providing environment to write multiple programming language code (E.g. Java, php, python, c, c++ and etc.) • We can easily design models (e.g. UML, XSD and etc.) • Easily integrate third pary library in our code (e.g. Facebook API, Twitter API, dropbox API and etc.) • Eclipse helps to make test driven application 11
  • 12. Sample Java code /* This is a simple Java program. Call this file Example.java. */ class Example { // A Java program begins with a call to main(). public static void main(String args[]) { System.out.println("Java drives the Web."); } } 12
  • 13. Execute Java code You will follow these three steps: 1. Enter the program >> CD C://path 2. Compile the program C://path>> Javac helloworld.java 3. Run the program C://path>> java helloworld 13
  • 14. Data types in Java Data Type Default Value (for fields) byte 0 -- 8– bit short 0 -- 8– bit int 0 -- 32 – bit long 0L – 64– bit float 0.0f -- 32-bit double 0.0d – 64- bit char 'u0000‘ – 16- bit String (or any object) null boolean false – (True and false) 14
  • 15. Arithmatic operator Arithmetic Operators • + Additive operator (also used for String concatenation) • - Subtraction operator • * Multiplication operator • / Division operator • % Remainder operator 15
  • 16. Java Example • Addition of two integer Number • Subtraction of two integer Number • Division of two integer Number • Multiplication of two integer Number • Modulus of two integer Number 16
  • 17. Group work Design and build a code for simple arithmatic operation calculator 17
  • 18. Java comparision operator Equality and Relational Operators • == Equal to • != Not equal to • > Greater than • >= Greater than or equal to • < Less than • <= Less than or equal to Conditional Operators • && Conditional-AND • || Conditional-OR • ?: Ternary (shorthand for if-then-else statement) 18
  • 19. References • [<Java For Beginners> <homeandlearn> http://www.homeandlearn.co.uk/java/java.html <Date><Publish>] • [<Java A Beginner’s Guide> <Herbert schildt> http://www.mhprofessional.com/downloads/product s/0071606327/01-ch01_6327.pdf <Date><McGraw- Hill> ] 19

Editor's Notes

  1. Integrate Development Environment
  2. https://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
  3. http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html