Você está na página 1de 19

CELINO, EZRA JOY D.

NACINOPA,RAYMOND CHRIS
V.
DELA CRUZ, GELEEN V.

When a programming
language is created that
allows programmers to
program in simple English, it
will be discovered that
programmers cannot speak
English.

JAVA PROGRAMMING

Java - The new programming language developed by Sun Microsystems


in 1991.
Originally called Oak by James Gosling, one of the inventors of the Java
Language.
Java -The name that survived a patent search
Java Authors: James , Arthur Van , and others
Java is really C++ -- ++

2 | Page

JAVA PROGRAMMING

3 | Page

JAVA PROGRAMMING

Java Compiler - Java source code (file with extension .java) to bytecode (file with
extension .class)
Bytecode - an intermediate form, closer to machine representation
A interpreter (virtual machine) on any target platform interprets the bytecode.

4 | Page

JAVA PROGRAMMING

5 | Page

JAVA PROGRAMMING

6 | Page

JAVA PROGRAMMING

Main Concepts
Object
Class
Inheritance
Encapsulation
Objects
identity unique identification of an object
attributes data/state
services methods/operations
supported by the object
Within objects responsibility to provide these services to
other clients.
Class

type
object is an instance of class
class groups similar objects
same (structure of) attributes
same services
object holds values of its classs attributes

Encapsulation
Separation between internal state of the object and its
external aspects
How ?
control access to members of the class
interface type
Inheritance
Class hierarchy
Generalization and Specialization
subclass inherits attributes and services from its super
class
subclass may add new attributes and services
subclass may reuse the code in the super class

7 | Page

JAVA PROGRAMMING
subclasses provide specialized behaviors (overriding and
dynamic binding)
partially define and implement common behaviors
(abstract)

8 | Page

JAVA PROGRAMMING

9 | Page

JAVA PROGRAMMING

10 | P a g e

JAVA PROGRAMMING

11 | P a g e

JAVA PROGRAMMING

While Counter

Do While

12 | P a g e

JAVA PROGRAMMING

Break Test

JOption Pane

13 | P a g e

JAVA PROGRAMMING

JFrame and JOptionPane

14 | P a g e

JAVA PROGRAMMING

15 | P a g e

JAVA PROGRAMMING

16 | P a g e

JAVA PROGRAMMING

17 | P a g e

JAVA PROGRAMMING
Lines Rectangle and Oval.

18 | P a g e

JAVA PROGRAMMING

SHAPES PANEL

19 | P a g e

Você também pode gostar