SlideShare a Scribd company logo
Java Fundamentals
Topics to be covered
 Difference between object-oriented programming and
procedural programming
 Advantages of OOP
 Introduction to Java
 Building a Java class
Object-Oriented Programming (OOP) vs.
Top-Down (Procedural) Programming
 OO approach
 System is defined as a collection of objects that work
together to accomplish tasks
 Objects carry out actions when asked
 Each object maintains its own data
 Procedural approach
 System is defined as a set of procedures that interact
with data
 Data is maintained separately from procedures
Java fundamentals 2
Advantages of Object-Oriented
System Development
 Objects are more natural
 Reuse
 Classes and objects can be invented once and used many
times during analysis, design, and programming
 Do not need source code for reused class, simply need to
know interface
Java fundamentals 2
Introducing Java
 Released mid 1995 by Sun Microsystems
 Designed to be:
 A powerful, full-featured, pure OO development
language
 Easy to learn - syntax is similar to C++
 Platform independent
 Support development of applications for networked
environment
 Ideal for Web-based applications
Introducing Java
 Powerful
 Class library
 Hundreds of prewritten classes
 Provide methods to accomplish various tasks
 OO
 Implements OO concepts described in Ch. 1
 Encourages good software design
 Reduces debugging and maintenance
Introducing Java
 Portability
 Programs can be written and compiled once, then run
on different platforms
 Important for internet applications (applets)
 Achieved by using:
 Bytecode
 Produced when a Java program is compiled
 Interpreter (Java Virtual Machine – JVM)
 Execution environment for bytecode on each platform
Building a Java Class
 Each source code file defines a class
 Class
 Hello.class
 File
 Hello.java
 Class header
 Describes class contained in source code file
 Keywords:
 public
 Indicates class has public availability
 class
 Indicates line of code is a class header
Building a Java Class
 Identifiers
 Name of a class, method, or variable
 Can be any length
 Can include any character except a space
 Must begin with a letter of the alphabet, a dollar sign ($), or
the underscore (_) character
 Java is case sensitive
 Public isn’t the same as public
 Block of code
 Used to group statements
 Delineated by open curly brace ({) and closed curly
brace (})
 All code in Java is enclosed in a single block of code,
which can contain additional blocks

More Related Content

DOCX
Java and its features
PPTX
Java
PPTX
Features of JAVA Programming Language.
PPT
Introduction to oops
PPT
INTRODUCTION TO JAVA APPLICATION
PPTX
Basic online java course - Brainsmartlabs
PPTX
Core java programming tutorial - Brainsmartlabs
PPTX
What is java?-Saurabh Upadhyay
Java and its features
Java
Features of JAVA Programming Language.
Introduction to oops
INTRODUCTION TO JAVA APPLICATION
Basic online java course - Brainsmartlabs
Core java programming tutorial - Brainsmartlabs
What is java?-Saurabh Upadhyay

What's hot (20)

PPTX
java training in jaipur|java training|core java training|java training compa...
PPSX
Introduction of java
PPT
Java features
PPTX
computer science JAVA ppt
ODP
Introduction To Java.
PPTX
PDF
PPTX
PPTX
Advantages of java
PPT
Comp102 lec 3
PDF
Learn Java with Dr. Rifat Shahriyar
PPTX
PPTX
Introduction to Java Programming
PPTX
Features of java - javatportal
PPSX
Core java lessons
PPTX
Important features of java
PPTX
C sharp
ODP
Basic of Java
PDF
Java trainingcourse(1)
PPTX
Introduction to Java -unit-1
java training in jaipur|java training|core java training|java training compa...
Introduction of java
Java features
computer science JAVA ppt
Introduction To Java.
Advantages of java
Comp102 lec 3
Learn Java with Dr. Rifat Shahriyar
Introduction to Java Programming
Features of java - javatportal
Core java lessons
Important features of java
C sharp
Basic of Java
Java trainingcourse(1)
Introduction to Java -unit-1
Ad

Similar to Java fundamentals 2 (20)

PDF
Introduction to Java Programming.pdf
PDF
Java Programming
PPTX
Vb.net basics 1(vb,net--3 year)
PPTX
Unit1 introduction to Java
PPTX
Object Oriented Programming unit 1 content for students
PPTX
java oops and java very important for .pptx
PPTX
java oops compilation object class inheritance.pptx
PPTX
Chapter 1
PPT
Classes and Objects
PDF
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PPTX
Unit 1 – Introduction to Java- (Shilpa R).pptx
PPT
Java_presesntation.ppt
PPTX
Java notes jkuat it
PPTX
Java notes(OOP) jkuat IT esection
PPTX
Manuel - SPR - Intro to Java Language_2016
PPTX
JAVA PROGRAMMING-Unit I - Final PPT.pptx
PPTX
Introduction to java
PPTX
Core java
Introduction to Java Programming.pdf
Java Programming
Vb.net basics 1(vb,net--3 year)
Unit1 introduction to Java
Object Oriented Programming unit 1 content for students
java oops and java very important for .pptx
java oops compilation object class inheritance.pptx
Chapter 1
Classes and Objects
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
Unit 1 – Introduction to Java- (Shilpa R).pptx
Java_presesntation.ppt
Java notes jkuat it
Java notes(OOP) jkuat IT esection
Manuel - SPR - Intro to Java Language_2016
JAVA PROGRAMMING-Unit I - Final PPT.pptx
Introduction to java
Core java
Ad

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Lesson notes of climatology university.
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
RMMM.pdf make it easy to upload and study
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Classroom Observation Tools for Teachers
PPTX
Cell Types and Its function , kingdom of life
PDF
Basic Mud Logging Guide for educational purpose
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Insiders guide to clinical Medicine.pdf
Cell Structure & Organelles in detailed.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
human mycosis Human fungal infections are called human mycosis..pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Lesson notes of climatology university.
102 student loan defaulters named and shamed – Is someone you know on the list?
RMMM.pdf make it easy to upload and study
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
STATICS OF THE RIGID BODIES Hibbelers.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Classroom Observation Tools for Teachers
Cell Types and Its function , kingdom of life
Basic Mud Logging Guide for educational purpose
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Insiders guide to clinical Medicine.pdf

Java fundamentals 2

  • 2. Topics to be covered  Difference between object-oriented programming and procedural programming  Advantages of OOP  Introduction to Java  Building a Java class
  • 3. Object-Oriented Programming (OOP) vs. Top-Down (Procedural) Programming  OO approach  System is defined as a collection of objects that work together to accomplish tasks  Objects carry out actions when asked  Each object maintains its own data  Procedural approach  System is defined as a set of procedures that interact with data  Data is maintained separately from procedures
  • 5. Advantages of Object-Oriented System Development  Objects are more natural  Reuse  Classes and objects can be invented once and used many times during analysis, design, and programming  Do not need source code for reused class, simply need to know interface
  • 7. Introducing Java  Released mid 1995 by Sun Microsystems  Designed to be:  A powerful, full-featured, pure OO development language  Easy to learn - syntax is similar to C++  Platform independent  Support development of applications for networked environment  Ideal for Web-based applications
  • 8. Introducing Java  Powerful  Class library  Hundreds of prewritten classes  Provide methods to accomplish various tasks  OO  Implements OO concepts described in Ch. 1  Encourages good software design  Reduces debugging and maintenance
  • 9. Introducing Java  Portability  Programs can be written and compiled once, then run on different platforms  Important for internet applications (applets)  Achieved by using:  Bytecode  Produced when a Java program is compiled  Interpreter (Java Virtual Machine – JVM)  Execution environment for bytecode on each platform
  • 10. Building a Java Class  Each source code file defines a class  Class  Hello.class  File  Hello.java  Class header  Describes class contained in source code file  Keywords:  public  Indicates class has public availability  class  Indicates line of code is a class header
  • 11. Building a Java Class  Identifiers  Name of a class, method, or variable  Can be any length  Can include any character except a space  Must begin with a letter of the alphabet, a dollar sign ($), or the underscore (_) character  Java is case sensitive  Public isn’t the same as public
  • 12.  Block of code  Used to group statements  Delineated by open curly brace ({) and closed curly brace (})  All code in Java is enclosed in a single block of code, which can contain additional blocks