SlideShare una empresa de Scribd logo
1 de 16
Welcome To
Problem Solving
  with OOP
  and Java
Who Should Learn Java?
Have you done some programming?

Do you want to learn Java?

Do you prefer stimulating dinner conversations
over coffee to dry, dull, technical lectures?

Do you need this course to graduate?
Java?




 © PIC 2012
Java?




http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
What Is A Computer?
A computer is something that takes in information
(input), processes it according to a set of
instructions (program), and produces a result
(output).

Computers communicate through a binary
alphabet. The letters in this alphabet are ‘0’ and
‘1’. Everything else is made out of these ‘letters’
which are called bits.

Bits are represented in a computer by electrical
signals: low voltage would mean a ‘0’ and higher
voltage a ‘1’. Eight bits gathered together form
one byte.
                    IDC3931 © PIC
What Is JAVA?
Java is a free, open-source, Object Oriented
Programming (OOP) language – everything is
contained inside classes and objects.

Java isportable – it can run on any machine
with a Java Virtual Machine (JVM) installed.

No matter what computer you have, you can
write the same Java programs.
How WEuse Java
                             V
                             i
                             r
                             t
                             u
                             a
                    Java     l
Sourc
e                  bytecod   M
Code                  e      a
        Compiler             c
                             h
                             i
                             n
                             e
                             s
How WEuse Java
                 Virtual Machines
Source Code




                 Java bytecode
 Compiler
Code Structure in Java
               Collection of Java files
source              contains many
code           classes
  class
  file         A class
  method       aclass.java
  1
  statement         contains many
                    methods and
                    variables
  method       public class aclass{
  2
  statement
                    public void
   statement
               method()      {

               }

               }
What goes in the source
                   file?
A source file (with the .java extension)
holds one class definition. The class
represents a piece of your program,
                                           public class Bicycle {
although a very tiny application might
need just a single class. The class must
go within a pair of

               curly braces


 The source file MUST have the same
 name as the class. For example, the
 Bicycle class must be stored in the
 Bicycle.javafile.                         }

 A class is the blueprint from
 which individual objects are
 created.                                       clas
What goes in a class?
A class has one or more methods. In
the Bicycle class, the pedal method will
hold instructions for how the Bicycle
                                           public class Bicycle{
should pedal. Your methods must be
                                                void pedal( ) {
declared inside a class (in other words,
within the

                 curly braces


of the class).
                                               }
   A bicycle might have some               }
   methods such as:
   speedup(), break(), gear(), directi
   on()…
                                           metho
What goes in a method?
Within the

               curly braces                public class Dog {
                                                         Bicycle{
                                           void bark ( )) {{
                                                pedal(

of a method, write your instructions for   statement1;
how that method should be performed.            statement1;
                                           statement2;
Method code is basically a set of               statement2;
                                                 statement3;
statements, and for now you can think           statement3;
of a function or procedure.

                                           }   }
                                           }


                                           statemen
One Blueprint Can Be Used To
      Help Build Different
         Objects
                    Shape

                  rotate ( )
                  playSound
                  ()


                         This is called
                         inheritance




Squar                          Circle
                                          Amoeba
e       Triangl
        e
EVERYTHING
is made from OBJECTS
          Object       This is the Object class
                       from which ALL other
       equals()        objects are created.
       getClass()
       hashCode()
       toString()



          Shape

       rotate()
       playSound()



          Circle

       doSomething()
What You Will Get Out Of
Learning and Using Java!
Build your programming skills and confidence.

A thorough understanding of Object Oriented
Programming.

Learn a language that can be run on any platform.

Learn how to work and program in groups.

Develop Graphical User Interfaces.
Where To Start
Setup Eclipse Classic

Write your first Java program

If you can, bring your laptops to class every
lecture!

Más contenido relacionado

La actualidad más candente

Object-Oriented Programming with C#
Object-Oriented Programming with C#Object-Oriented Programming with C#
Object-Oriented Programming with C#Svetlin Nakov
 
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaJava Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaEdureka!
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPsRavi Bhadauria
 
Lightning talk
Lightning talkLightning talk
Lightning talknpalaniuk
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classesKumar
 
Classes And Methods
Classes And MethodsClasses And Methods
Classes And Methodsadil raja
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in phpCPD INDIA
 

La actualidad más candente (10)

Object-Oriented Programming with C#
Object-Oriented Programming with C#Object-Oriented Programming with C#
Object-Oriented Programming with C#
 
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | EdurekaJava Programming | Java Tutorial For Beginners | Java Training | Edureka
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
 
Core java
Core javaCore java
Core java
 
Core java
Core javaCore java
Core java
 
Object oreinted php | OOPs
Object oreinted php | OOPsObject oreinted php | OOPs
Object oreinted php | OOPs
 
Php oop presentation
Php   oop presentationPhp   oop presentation
Php oop presentation
 
Lightning talk
Lightning talkLightning talk
Lightning talk
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classes
 
Classes And Methods
Classes And MethodsClasses And Methods
Classes And Methods
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 

Destacado (9)

CGS2835 HTML5
CGS2835 HTML5CGS2835 HTML5
CGS2835 HTML5
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Xhtml
XhtmlXhtml
Xhtml
 
Webdev
WebdevWebdev
Webdev
 
Web architecture
Web architectureWeb architecture
Web architecture
 
Database basics
Database basicsDatabase basics
Database basics
 
CGS2835 HTML5
CGS2835 HTML5CGS2835 HTML5
CGS2835 HTML5
 
Web architecture v3
Web architecture v3Web architecture v3
Web architecture v3
 

Similar a 01 intro tousingjava

Similar a 01 intro tousingjava (20)

01 - Intro To Using Java
01 - Intro To Using Java01 - Intro To Using Java
01 - Intro To Using Java
 
01 intro to using java
01 intro to using java01 intro to using java
01 intro to using java
 
DAY_1.1.pptx
DAY_1.1.pptxDAY_1.1.pptx
DAY_1.1.pptx
 
01slide
01slide01slide
01slide
 
01slide
01slide01slide
01slide
 
Java questions with answers
Java questions with answersJava questions with answers
Java questions with answers
 
Core java-introduction
Core java-introductionCore java-introduction
Core java-introduction
 
01slide (1)ffgfefge
01slide (1)ffgfefge01slide (1)ffgfefge
01slide (1)ffgfefge
 
Java Programming and J2ME: The Basics
Java Programming and J2ME: The BasicsJava Programming and J2ME: The Basics
Java Programming and J2ME: The Basics
 
Java For beginners and CSIT and IT students
Java  For beginners and CSIT and IT studentsJava  For beginners and CSIT and IT students
Java For beginners and CSIT and IT students
 
Java intro
Java introJava intro
Java intro
 
Jvm internals
Jvm internalsJvm internals
Jvm internals
 
01slide
01slide01slide
01slide
 
java basic .pdf
java basic .pdfjava basic .pdf
java basic .pdf
 
Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Understanding And Using Reflection
Understanding And Using ReflectionUnderstanding And Using Reflection
Understanding And Using Reflection
 
Intro Java Rev010
Intro Java Rev010Intro Java Rev010
Intro Java Rev010
 
Fundamentals of oop lecture 2
Fundamentals of oop lecture 2Fundamentals of oop lecture 2
Fundamentals of oop lecture 2
 
Java introduction
Java introductionJava introduction
Java introduction
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
 

Más de Program in Interdisciplinary Computing (20)

Phpmysqlcoding
PhpmysqlcodingPhpmysqlcoding
Phpmysqlcoding
 
Sdlc
SdlcSdlc
Sdlc
 
Mysocial
MysocialMysocial
Mysocial
 
Javascript
JavascriptJavascript
Javascript
 
Javascript
JavascriptJavascript
Javascript
 
Html5
Html5Html5
Html5
 
Frameworks
FrameworksFrameworks
Frameworks
 
Drupal
DrupalDrupal
Drupal
 
Database
DatabaseDatabase
Database
 
Javascript2
Javascript2Javascript2
Javascript2
 
12 abstract classes
12 abstract classes12 abstract classes
12 abstract classes
 
11 polymorphism
11 polymorphism11 polymorphism
11 polymorphism
 
13 interfaces
13 interfaces13 interfaces
13 interfaces
 
15b more gui
15b more gui15b more gui
15b more gui
 
15a gui
15a gui15a gui
15a gui
 
14b exceptions
14b exceptions14b exceptions
14b exceptions
 
14a exceptions
14a exceptions14a exceptions
14a exceptions
 
13 life and scope
13 life and scope13 life and scope
13 life and scope
 
11 interfaces
11 interfaces11 interfaces
11 interfaces
 
10 abstract
10 abstract10 abstract
10 abstract
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

01 intro tousingjava

  • 1. Welcome To Problem Solving with OOP and Java
  • 2. Who Should Learn Java? Have you done some programming? Do you want to learn Java? Do you prefer stimulating dinner conversations over coffee to dry, dull, technical lectures? Do you need this course to graduate?
  • 5. What Is A Computer? A computer is something that takes in information (input), processes it according to a set of instructions (program), and produces a result (output). Computers communicate through a binary alphabet. The letters in this alphabet are ‘0’ and ‘1’. Everything else is made out of these ‘letters’ which are called bits. Bits are represented in a computer by electrical signals: low voltage would mean a ‘0’ and higher voltage a ‘1’. Eight bits gathered together form one byte. IDC3931 © PIC
  • 6. What Is JAVA? Java is a free, open-source, Object Oriented Programming (OOP) language – everything is contained inside classes and objects. Java isportable – it can run on any machine with a Java Virtual Machine (JVM) installed. No matter what computer you have, you can write the same Java programs.
  • 7. How WEuse Java V i r t u a Java l Sourc e bytecod M Code e a Compiler c h i n e s
  • 8. How WEuse Java Virtual Machines Source Code Java bytecode Compiler
  • 9. Code Structure in Java Collection of Java files source contains many code classes class file A class method aclass.java 1 statement contains many methods and variables method public class aclass{ 2 statement public void statement method() { } }
  • 10. What goes in the source file? A source file (with the .java extension) holds one class definition. The class represents a piece of your program, public class Bicycle { although a very tiny application might need just a single class. The class must go within a pair of curly braces The source file MUST have the same name as the class. For example, the Bicycle class must be stored in the Bicycle.javafile. } A class is the blueprint from which individual objects are created. clas
  • 11. What goes in a class? A class has one or more methods. In the Bicycle class, the pedal method will hold instructions for how the Bicycle public class Bicycle{ should pedal. Your methods must be void pedal( ) { declared inside a class (in other words, within the curly braces of the class). } A bicycle might have some } methods such as: speedup(), break(), gear(), directi on()… metho
  • 12. What goes in a method? Within the curly braces public class Dog { Bicycle{ void bark ( )) {{ pedal( of a method, write your instructions for statement1; how that method should be performed. statement1; statement2; Method code is basically a set of statement2; statement3; statements, and for now you can think statement3; of a function or procedure. } } } statemen
  • 13. One Blueprint Can Be Used To Help Build Different Objects Shape rotate ( ) playSound () This is called inheritance Squar Circle Amoeba e Triangl e
  • 14. EVERYTHING is made from OBJECTS Object This is the Object class from which ALL other equals() objects are created. getClass() hashCode() toString() Shape rotate() playSound() Circle doSomething()
  • 15. What You Will Get Out Of Learning and Using Java! Build your programming skills and confidence. A thorough understanding of Object Oriented Programming. Learn a language that can be run on any platform. Learn how to work and program in groups. Develop Graphical User Interfaces.
  • 16. Where To Start Setup Eclipse Classic Write your first Java program If you can, bring your laptops to class every lecture!