SlideShare a Scribd company logo
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!

More Related Content

PPTX
PPT
Md02 - Getting Started part-2
PDF
Java Cheat Sheet
PPT
Object oriented programming (oop) cs304 power point slides lecture 01
PDF
Access modifiers
PPTX
Access modifiers in java
PPT
Java non access modifiers
PDF
Object-oriented Programming-with C#
Md02 - Getting Started part-2
Java Cheat Sheet
Object oriented programming (oop) cs304 power point slides lecture 01
Access modifiers
Access modifiers in java
Java non access modifiers
Object-oriented Programming-with C#

What's hot (10)

PPTX
Object-Oriented Programming with C#
PDF
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
PDF
Core java
PPTX
Core java
PPTX
Object oreinted php | OOPs
PPTX
Php oop presentation
PPTX
Lightning talk
PPT
Php object orientation and classes
PDF
Classes And Methods
PPT
Oops concepts in php
Object-Oriented Programming with C#
Java Programming | Java Tutorial For Beginners | Java Training | Edureka
Core java
Core java
Object oreinted php | OOPs
Php oop presentation
Lightning talk
Php object orientation and classes
Classes And Methods
Oops concepts in php
Ad
Ad

Similar to 01 intro tousingjava (20)

PPTX
01 - Intro To Using Java
PPT
SMI - Introduction to Java
PDF
JAVA Object Oriented Programming (OOP)
PPTX
KEY
1 the language essentials
PPTX
Note for Java Programming////////////////
PPT
Java security
DOC
6010 java programming version 6
PPTX
UNIT I OOP AND JAVA FUNDAMENTALS CONSTRUCTOR
PPT
core java
PPT
Lecture 2 classes i
PPTX
JAVA-PPT'S-complete-chrome.pptx
PPTX
JAVA-PPT'S.pptx
PPTX
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
PDF
Core java 5 days workshop stuff
PDF
JAVA-PPT'S.pdf
PPTX
Object-Oriented Programming_ Core Java Concepts and Practices_Unit 1_Part 1.pptx
PPT
Cso gaddis java_chapter2
PPT
Core java
01 - Intro To Using Java
SMI - Introduction to Java
JAVA Object Oriented Programming (OOP)
1 the language essentials
Note for Java Programming////////////////
Java security
6010 java programming version 6
UNIT I OOP AND JAVA FUNDAMENTALS CONSTRUCTOR
core java
Lecture 2 classes i
JAVA-PPT'S-complete-chrome.pptx
JAVA-PPT'S.pptx
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
Core java 5 days workshop stuff
JAVA-PPT'S.pdf
Object-Oriented Programming_ Core Java Concepts and Practices_Unit 1_Part 1.pptx
Cso gaddis java_chapter2
Core java

More from Program in Interdisciplinary Computing (20)

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Cloud computing and distributed systems.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Review of recent advances in non-invasive hemoglobin estimation
Dropbox Q2 2025 Financial Results & Investor Presentation
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
NewMind AI Monthly Chronicles - July 2025
Cloud computing and distributed systems.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Review of recent advances in non-invasive hemoglobin estimation

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!