SlideShare a Scribd company logo
1 of 24
Daniel Muhammad Idrees
www.techgrasp.pk
• Co-Founder of TechGrasp.pk
Email: enggdaniyal@hotmail.com
LinkedIn: www.linkedin.com/in/danielmidrees
Facebook: www.facebook.com/daniel.mi
What to Expect?
• Guidance
• Counseling
• Mentorship
www.techgrasp.pk
What not to Expect?
•Spoon Feeding!
www.techgrasp.pk
What is Java?
www.techgrasp.pk
Variables
• Data Types
o Primitive Types
o Non-primitive Types
• Local Variables
o Choosing Data Type
o Declaring (String string;)
o Initializing (string = “Hello”)
• Access Modifiers
• Class (static) Variables
• Instance (non-static) Variables
www.techgrasp.pk
Primitive Data Types
www.techgrasp.pk
Non-Primitive Data Types
• User-created
• Nullable
• Also called “Reference Types”
• Examples:
o Arrays
o String
o Lists
www.techgrasp.pk
Access Modifiers
• Access Modifiers
o Public
o Private
o Protected
www.techgrasp.pk
Operators
• Airthematic (+,-,*,/,++,--,%)
• Relational (==,>=,<=,!=,>,<)
• Logical (&&,||, !)
www.techgrasp.pk
Remember!
• ‘=‘ and ‘==‘ are not SAME!
• Never use ‘==‘ instead of
equals() when comparing
reference types
www.techgrasp.pk
Controlling Flow of Execution
• Conditions
o if – else
o switch
• Loops
o for
o while
• Special Control Statements
o break, continue
o Return
o try-catch-finally
www.techgrasp.pk
Function
• Signatures
• Naming
• Parameters
• Returning Values
• Static/Non-static Functions
• Calling Functions
www.techgrasp.pk
Arrays
• Arrays
o Collection of Similar Items in Sequence
o Contains values or references
o Fixed, Finite Length
• Length
• Index
• Initialization
• Enhanced for loop
www.techgrasp.pk
Best Coding Practices
• Indentation
• Naming Convention
• Use of Comments
www.techgrasp.pk
Be an Engineer!
Not a Mechanic!
www.techgrasp.pk
Object Oriented
Programming
• Objects and Classes
o Object: Real World Entity
o Class: Blueprint of an Object
Pillars of OOP
• Inheritance
o Is-A and Has-A Relationship
• Polymorphism
o Method Overriding
• Using super keyword
o Method Overloading
www.techgrasp.pk
Pillars of OOP
• Abstraction
o Biggest Challenge in OOP
o Hiding complexity
o Abstract and Concrete Classes
• Encapsulation
o Hiding Internal Details
o Relevant Attributes and Behavior
o Access/Mutate (simply, get/set)
www.techgrasp.pk
Interfaces
• Why No Multiple Inheritance in Java?
• Interfaces are Contracts
• Rules
o No Instances
o No Constructors
o Only Method Signatures
o Only static final Members
www.techgrasp.pk
Exception Handling
• Try block
• Catch Block
• Finally
www.techgrasp.pk
Read more JAVA from:
• Java Actually by Khalid A. Mughal
• The Complete Reference Java by Herbert Schildt
• http://www.tutorialspoint.com/java/
• http://javatpoint.com/java-tutorial
Take Help From:
• Stackoverflow
• Google!
www.techgrasp.pk
What we have covered:
• Variables
• Data types
• Access Modifiers
• Operators
• Controlling Flow of Execution
• Function
• Array
• Pillars of OOP (Abstraction, Inheritance, Polymorphism,
Encapsulation)
• Interfaces
• Exception Handling
www.techgrasp.pk
What I expect from you
• Learn
• Adapt
• Share
• Team Work
• Lead
• Make a Difference
www.techgrasp.pk
Thank You!
www.techgrasp.pk

More Related Content

Similar to Basic Java And OOP

"SOLID" Object Oriented Design Principles
"SOLID" Object Oriented Design Principles"SOLID" Object Oriented Design Principles
"SOLID" Object Oriented Design Principles
Serhiy Oplakanets
 
Google App Engine - exploiting limitations
Google App Engine - exploiting limitationsGoogle App Engine - exploiting limitations
Google App Engine - exploiting limitations
Tomáš Holas
 
Unbreaking Your Django Application
Unbreaking Your Django ApplicationUnbreaking Your Django Application
Unbreaking Your Django Application
OSCON Byrum
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
rsebbe
 

Similar to Basic Java And OOP (20)

Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
"SOLID" Object Oriented Design Principles
"SOLID" Object Oriented Design Principles"SOLID" Object Oriented Design Principles
"SOLID" Object Oriented Design Principles
 
QA / Testing Tools, Automation Testing, Online & Classroom Training
QA / Testing Tools, Automation Testing, Online & Classroom Training QA / Testing Tools, Automation Testing, Online & Classroom Training
QA / Testing Tools, Automation Testing, Online & Classroom Training
 
Intro to Python for C# Developers
Intro to Python for C# DevelopersIntro to Python for C# Developers
Intro to Python for C# Developers
 
12_oop templa.pptx
12_oop templa.pptx12_oop templa.pptx
12_oop templa.pptx
 
PHP Classroom Training
PHP Classroom TrainingPHP Classroom Training
PHP Classroom Training
 
Python Training in Hyderabad
Python Training in HyderabadPython Training in Hyderabad
Python Training in Hyderabad
 
Python training in hyderabad
Python training in hyderabadPython training in hyderabad
Python training in hyderabad
 
Diversity != stock photos: Are you looking for candidates in all the wrong pl...
Diversity != stock photos: Are you looking for candidates in all the wrong pl...Diversity != stock photos: Are you looking for candidates in all the wrong pl...
Diversity != stock photos: Are you looking for candidates in all the wrong pl...
 
Google App Engine - exploiting limitations
Google App Engine - exploiting limitationsGoogle App Engine - exploiting limitations
Google App Engine - exploiting limitations
 
AP computer barron book ppt AP CS A.pptx
AP computer barron book ppt AP CS A.pptxAP computer barron book ppt AP CS A.pptx
AP computer barron book ppt AP CS A.pptx
 
Testing-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdfTesting-Tools-Magnitia-Content.pdf
Testing-Tools-Magnitia-Content.pdf
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Unbreaking Your Django Application
Unbreaking Your Django ApplicationUnbreaking Your Django Application
Unbreaking Your Django Application
 
Craft of coding
Craft of codingCraft of coding
Craft of coding
 
OOPs fundamentals session for freshers in my office (Aug 5, 13)
OOPs fundamentals session for freshers in my office (Aug 5, 13)OOPs fundamentals session for freshers in my office (Aug 5, 13)
OOPs fundamentals session for freshers in my office (Aug 5, 13)
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails Developer
 
IOTDB, Semantics and the Internet of Things
IOTDB, Semantics and the Internet of ThingsIOTDB, Semantics and the Internet of Things
IOTDB, Semantics and the Internet of Things
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 

Basic Java And OOP

  • 1. Daniel Muhammad Idrees www.techgrasp.pk • Co-Founder of TechGrasp.pk Email: enggdaniyal@hotmail.com LinkedIn: www.linkedin.com/in/danielmidrees Facebook: www.facebook.com/daniel.mi
  • 2. What to Expect? • Guidance • Counseling • Mentorship www.techgrasp.pk
  • 3. What not to Expect? •Spoon Feeding! www.techgrasp.pk
  • 5. Variables • Data Types o Primitive Types o Non-primitive Types • Local Variables o Choosing Data Type o Declaring (String string;) o Initializing (string = “Hello”) • Access Modifiers • Class (static) Variables • Instance (non-static) Variables www.techgrasp.pk
  • 7. Non-Primitive Data Types • User-created • Nullable • Also called “Reference Types” • Examples: o Arrays o String o Lists www.techgrasp.pk
  • 8. Access Modifiers • Access Modifiers o Public o Private o Protected www.techgrasp.pk
  • 9. Operators • Airthematic (+,-,*,/,++,--,%) • Relational (==,>=,<=,!=,>,<) • Logical (&&,||, !) www.techgrasp.pk
  • 10. Remember! • ‘=‘ and ‘==‘ are not SAME! • Never use ‘==‘ instead of equals() when comparing reference types www.techgrasp.pk
  • 11. Controlling Flow of Execution • Conditions o if – else o switch • Loops o for o while • Special Control Statements o break, continue o Return o try-catch-finally www.techgrasp.pk
  • 12. Function • Signatures • Naming • Parameters • Returning Values • Static/Non-static Functions • Calling Functions www.techgrasp.pk
  • 13. Arrays • Arrays o Collection of Similar Items in Sequence o Contains values or references o Fixed, Finite Length • Length • Index • Initialization • Enhanced for loop www.techgrasp.pk
  • 14. Best Coding Practices • Indentation • Naming Convention • Use of Comments www.techgrasp.pk
  • 15. Be an Engineer! Not a Mechanic! www.techgrasp.pk
  • 16. Object Oriented Programming • Objects and Classes o Object: Real World Entity o Class: Blueprint of an Object
  • 17. Pillars of OOP • Inheritance o Is-A and Has-A Relationship • Polymorphism o Method Overriding • Using super keyword o Method Overloading www.techgrasp.pk
  • 18. Pillars of OOP • Abstraction o Biggest Challenge in OOP o Hiding complexity o Abstract and Concrete Classes • Encapsulation o Hiding Internal Details o Relevant Attributes and Behavior o Access/Mutate (simply, get/set) www.techgrasp.pk
  • 19. Interfaces • Why No Multiple Inheritance in Java? • Interfaces are Contracts • Rules o No Instances o No Constructors o Only Method Signatures o Only static final Members www.techgrasp.pk
  • 20. Exception Handling • Try block • Catch Block • Finally www.techgrasp.pk
  • 21. Read more JAVA from: • Java Actually by Khalid A. Mughal • The Complete Reference Java by Herbert Schildt • http://www.tutorialspoint.com/java/ • http://javatpoint.com/java-tutorial Take Help From: • Stackoverflow • Google! www.techgrasp.pk
  • 22. What we have covered: • Variables • Data types • Access Modifiers • Operators • Controlling Flow of Execution • Function • Array • Pillars of OOP (Abstraction, Inheritance, Polymorphism, Encapsulation) • Interfaces • Exception Handling www.techgrasp.pk
  • 23. What I expect from you • Learn • Adapt • Share • Team Work • Lead • Make a Difference www.techgrasp.pk