SlideShare a Scribd company logo
Object Oriented
Programming
Asif Shahzad
Assistant Professor
COMSATS University, Lahore Campus
Before You Start OOP
•You must know how and when to use below
concepts:
•Constants
•Variables
•Expressions
•Conditions
•Loops
Why Object Oriented Programming
• Near to real life objects
• Modularity
• Reusability, inherit from what you have already done
• Code maintenance
• Security
• Flexibility
• Productivity
• Almost all types of apps are developed using OOP
paradigm
Introduction to Java
• Portability: Write Once, Run Anywhere
• Memory management is done by language runtime
• Robust, Secure and Reliable – No pointer arithmetic,
compile time error checking, bytecode verification, etc.
• Strong libraries of components available
• Supports distributed applications, multithreading
• Open Standard – Specs and implementations are
developed separately
Brief History
• Microprocessor are key component in consumer-electronics
• 1991 - Sun Microsystems funded an internal project led by James
Gosling, to write a language that shall execute on all microprocessor
for consumer-electronics.
• 1993, the web wide adaptation given rise to Java because Sun
Micrsosystems launched features to create web applications
• Java become popular because of web, not for its initial goal.
• In 2009, Oracle acquired Sun Microsystems
Life Cycle of Java Program
Life Cycle of Java Program
Make HelloWorldApp program
• Make and run first java program
• Learn basic DOS commands
• cd
• dir
• change drive
• mkdir
• Open a path directly in DOS
Language Basics - Primitive Types
• Variables – Name, Type, Size and Value
• Primitive Types are basic data types provided by Java.
• Names, Category, Memory Size, Literals
• Complex/Composite data types are created using
primitives and other composite types.
Language Basics
• Escape Sequences,
• Format Specifiers
• System.print* methods
• Getting different types of input from User

More Related Content

What's hot

Tehran's 1st Android bootcamp - Part2
Tehran's 1st Android bootcamp - Part2Tehran's 1st Android bootcamp - Part2
Tehran's 1st Android bootcamp - Part2
Mohsen Mirhoseini
 
Features of java 02
Features of java 02Features of java 02
Features of java 02
University of Potsdam
 
Microsoft Robotics Developer Studio presentation by Md Kamal Azhar
Microsoft Robotics Developer Studio presentation by Md Kamal AzharMicrosoft Robotics Developer Studio presentation by Md Kamal Azhar
Microsoft Robotics Developer Studio presentation by Md Kamal Azhar
Md Kamal Azhar
 
Developing Java EE applications with NetBeans and Payara
Developing Java EE applications with NetBeans and PayaraDeveloping Java EE applications with NetBeans and Payara
Developing Java EE applications with NetBeans and Payara
Payara
 
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
SpringPeople
 
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug JavaWriting better code: How the Netbeans IDE Helps you Write, Test and Debug Java
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
idrsolutions
 
Deploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with DockerDeploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with Docker
Payara
 
A Look at What's New and Noteworthy in JavaFX 1.3
A Look at What's New and Noteworthy in JavaFX 1.3A Look at What's New and Noteworthy in JavaFX 1.3
A Look at What's New and Noteworthy in JavaFX 1.3
Sten Anderson
 
Intoduction to lagom framework
Intoduction to lagom frameworkIntoduction to lagom framework
Intoduction to lagom framework
Knoldus Inc.
 
Managing PTZ cameras using Elixir and the Phoenix Framework
Managing PTZ cameras using Elixir and the Phoenix FrameworkManaging PTZ cameras using Elixir and the Phoenix Framework
Managing PTZ cameras using Elixir and the Phoenix Framework
Jose Garcia-Sacristan
 
Java presetstion
Java presetstionJava presetstion
Java presetstion
leena1990
 
ITS320 Presentation
ITS320 PresentationITS320 Presentation
ITS320 Presentation
leena1990
 
Its320 power point
Its320 power pointIts320 power point
Its320 power point
leena1990
 

What's hot (13)

Tehran's 1st Android bootcamp - Part2
Tehran's 1st Android bootcamp - Part2Tehran's 1st Android bootcamp - Part2
Tehran's 1st Android bootcamp - Part2
 
Features of java 02
Features of java 02Features of java 02
Features of java 02
 
Microsoft Robotics Developer Studio presentation by Md Kamal Azhar
Microsoft Robotics Developer Studio presentation by Md Kamal AzharMicrosoft Robotics Developer Studio presentation by Md Kamal Azhar
Microsoft Robotics Developer Studio presentation by Md Kamal Azhar
 
Developing Java EE applications with NetBeans and Payara
Developing Java EE applications with NetBeans and PayaraDeveloping Java EE applications with NetBeans and Payara
Developing Java EE applications with NetBeans and Payara
 
Introduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeopleIntroduction To Core Java - SpringPeople
Introduction To Core Java - SpringPeople
 
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug JavaWriting better code: How the Netbeans IDE Helps you Write, Test and Debug Java
Writing better code: How the Netbeans IDE Helps you Write, Test and Debug Java
 
Deploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with DockerDeploying Elastic Java EE Microservices in the Cloud with Docker
Deploying Elastic Java EE Microservices in the Cloud with Docker
 
A Look at What's New and Noteworthy in JavaFX 1.3
A Look at What's New and Noteworthy in JavaFX 1.3A Look at What's New and Noteworthy in JavaFX 1.3
A Look at What's New and Noteworthy in JavaFX 1.3
 
Intoduction to lagom framework
Intoduction to lagom frameworkIntoduction to lagom framework
Intoduction to lagom framework
 
Managing PTZ cameras using Elixir and the Phoenix Framework
Managing PTZ cameras using Elixir and the Phoenix FrameworkManaging PTZ cameras using Elixir and the Phoenix Framework
Managing PTZ cameras using Elixir and the Phoenix Framework
 
Java presetstion
Java presetstionJava presetstion
Java presetstion
 
ITS320 Presentation
ITS320 PresentationITS320 Presentation
ITS320 Presentation
 
Its320 power point
Its320 power pointIts320 power point
Its320 power point
 

Similar to Lec01 intro and hello world program

Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
Soumya Suman
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
Ravi Kant Sahu
 
L1 basics
L1 basicsL1 basics
L1 basics
teach4uin
 
Accelerate your career in Java.pptx
Accelerate your career in Java.pptxAccelerate your career in Java.pptx
Accelerate your career in Java.pptx
GautamKumar163048
 
21110113913.pptxElectricity is a type of
21110113913.pptxElectricity is a type of21110113913.pptxElectricity is a type of
21110113913.pptxElectricity is a type of
pandeyritik310
 
Java Ch 1.pptx
Java Ch 1.pptxJava Ch 1.pptx
Java Ch 1.pptx
VanitaPatil14
 
Java
JavaJava
Lara Technology
Lara TechnologyLara Technology
Lara Technology
laratechnologies
 
Lara technologies
Lara technologiesLara technologies
Lara technologies
technologieslara
 
Introduction of java technology
Introduction of java technologyIntroduction of java technology
Introduction of java technology
technologieslara
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
Om Ganesh
 
Java
JavaJava
1 java introduction
1 java introduction1 java introduction
1 java introduction
abdullah al mahamud rosi
 
1 java intro
1 java intro1 java intro
JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1
Infoviaan Technologies
 
PALASH SL GUPTA
PALASH SL GUPTAPALASH SL GUPTA
PALASH SL GUPTA
PALASH GUPTA
 
The Java Story
The Java StoryThe Java Story
The Java Story
David Parsons
 
Java Basics
Java BasicsJava Basics
Java Basics
Fahad Shahzad
 
Java.pptx
Java.pptxJava.pptx
Java.pptx
AmanBhagat34
 
Java 15
Java 15Java 15
Java 15
raj esaki
 

Similar to Lec01 intro and hello world program (20)

Introduction to Java
Introduction to JavaIntroduction to Java
Introduction to Java
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
L1 basics
L1 basicsL1 basics
L1 basics
 
Accelerate your career in Java.pptx
Accelerate your career in Java.pptxAccelerate your career in Java.pptx
Accelerate your career in Java.pptx
 
21110113913.pptxElectricity is a type of
21110113913.pptxElectricity is a type of21110113913.pptxElectricity is a type of
21110113913.pptxElectricity is a type of
 
Java Ch 1.pptx
Java Ch 1.pptxJava Ch 1.pptx
Java Ch 1.pptx
 
Java
JavaJava
Java
 
Lara Technology
Lara TechnologyLara Technology
Lara Technology
 
Lara technologies
Lara technologiesLara technologies
Lara technologies
 
Introduction of java technology
Introduction of java technologyIntroduction of java technology
Introduction of java technology
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 
Java
JavaJava
Java
 
1 java introduction
1 java introduction1 java introduction
1 java introduction
 
1 java intro
1 java intro1 java intro
1 java intro
 
JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1JAVA INTRODUCTION - 1
JAVA INTRODUCTION - 1
 
PALASH SL GUPTA
PALASH SL GUPTAPALASH SL GUPTA
PALASH SL GUPTA
 
The Java Story
The Java StoryThe Java Story
The Java Story
 
Java Basics
Java BasicsJava Basics
Java Basics
 
Java.pptx
Java.pptxJava.pptx
Java.pptx
 
Java 15
Java 15Java 15
Java 15
 

More from Asif Shahzad

Cascading Style Sheets CSS
Cascading Style Sheets CSS Cascading Style Sheets CSS
Cascading Style Sheets CSS
Asif Shahzad
 
Lec03 print on console and getting input
Lec03   print on console and getting inputLec03   print on console and getting input
Lec03 print on console and getting input
Asif Shahzad
 
Lec02 primitive types
Lec02   primitive typesLec02   primitive types
Lec02 primitive types
Asif Shahzad
 
Lec08 constructors
Lec08   constructorsLec08   constructors
Lec08 constructors
Asif Shahzad
 
Lec07 data hiding and encapsulation
Lec07   data hiding and encapsulationLec07   data hiding and encapsulation
Lec07 data hiding and encapsulation
Asif Shahzad
 
Lec04 if-else and loops
Lec04   if-else and loopsLec04   if-else and loops
Lec04 if-else and loops
Asif Shahzad
 
Lec05 class and object
Lec05   class and objectLec05   class and object
Lec05 class and object
Asif Shahzad
 
Cv writing and job search
Cv writing and job searchCv writing and job search
Cv writing and job search
Asif Shahzad
 
Domain Name System (DNS) - Domain Registration and Website Hosting Basics
Domain Name System (DNS) - Domain Registration and Website Hosting BasicsDomain Name System (DNS) - Domain Registration and Website Hosting Basics
Domain Name System (DNS) - Domain Registration and Website Hosting Basics
Asif Shahzad
 
Scope of Information Technology
Scope of Information TechnologyScope of Information Technology
Scope of Information Technology
Asif Shahzad
 

More from Asif Shahzad (10)

Cascading Style Sheets CSS
Cascading Style Sheets CSS Cascading Style Sheets CSS
Cascading Style Sheets CSS
 
Lec03 print on console and getting input
Lec03   print on console and getting inputLec03   print on console and getting input
Lec03 print on console and getting input
 
Lec02 primitive types
Lec02   primitive typesLec02   primitive types
Lec02 primitive types
 
Lec08 constructors
Lec08   constructorsLec08   constructors
Lec08 constructors
 
Lec07 data hiding and encapsulation
Lec07   data hiding and encapsulationLec07   data hiding and encapsulation
Lec07 data hiding and encapsulation
 
Lec04 if-else and loops
Lec04   if-else and loopsLec04   if-else and loops
Lec04 if-else and loops
 
Lec05 class and object
Lec05   class and objectLec05   class and object
Lec05 class and object
 
Cv writing and job search
Cv writing and job searchCv writing and job search
Cv writing and job search
 
Domain Name System (DNS) - Domain Registration and Website Hosting Basics
Domain Name System (DNS) - Domain Registration and Website Hosting BasicsDomain Name System (DNS) - Domain Registration and Website Hosting Basics
Domain Name System (DNS) - Domain Registration and Website Hosting Basics
 
Scope of Information Technology
Scope of Information TechnologyScope of Information Technology
Scope of Information Technology
 

Recently uploaded

Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 

Recently uploaded (20)

Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 

Lec01 intro and hello world program

  • 1. Object Oriented Programming Asif Shahzad Assistant Professor COMSATS University, Lahore Campus
  • 2. Before You Start OOP •You must know how and when to use below concepts: •Constants •Variables •Expressions •Conditions •Loops
  • 3. Why Object Oriented Programming • Near to real life objects • Modularity • Reusability, inherit from what you have already done • Code maintenance • Security • Flexibility • Productivity • Almost all types of apps are developed using OOP paradigm
  • 4. Introduction to Java • Portability: Write Once, Run Anywhere • Memory management is done by language runtime • Robust, Secure and Reliable – No pointer arithmetic, compile time error checking, bytecode verification, etc. • Strong libraries of components available • Supports distributed applications, multithreading • Open Standard – Specs and implementations are developed separately
  • 5. Brief History • Microprocessor are key component in consumer-electronics • 1991 - Sun Microsystems funded an internal project led by James Gosling, to write a language that shall execute on all microprocessor for consumer-electronics. • 1993, the web wide adaptation given rise to Java because Sun Micrsosystems launched features to create web applications • Java become popular because of web, not for its initial goal. • In 2009, Oracle acquired Sun Microsystems
  • 6. Life Cycle of Java Program
  • 7. Life Cycle of Java Program
  • 8. Make HelloWorldApp program • Make and run first java program • Learn basic DOS commands • cd • dir • change drive • mkdir • Open a path directly in DOS
  • 9. Language Basics - Primitive Types • Variables – Name, Type, Size and Value • Primitive Types are basic data types provided by Java. • Names, Category, Memory Size, Literals • Complex/Composite data types are created using primitives and other composite types.
  • 10. Language Basics • Escape Sequences, • Format Specifiers • System.print* methods • Getting different types of input from User