KEMBAR78
Object Oriented Programming - 3. Java Programming | PDF
Object Oriented
Programming
Andi Nurkholis, S.Kom., M.Kom.
Study Program of Informatics
Faculty of Engineering and Computer Science
SY. 2019-2020
March 2, 2020
3 Java Programming
2
Java History
Java is an object-oriented programming language
developed by James Gosling and colleagues at Sun
Microsystems in the early 1990s.
Java was started as a project called "Oak" by
James Gosling in June 1991. Gosling’s goals were
to implement a virtual machine and a language that
had a familiar C-like notation but with greater
uniformity and simplicity than C/C++. The first
public implementation was Java 1.0 in 1995.
3
4
Java Structure
An overview of the software development process
Java Virtual Machine
Through the Java VM, the same
application is capable of running on
multiple platforms.
5
Java Platform
The Java platform has two components:
• The Java Virtual Machine
• The Java Application Programming Interface (API)
6
What Can Java Technology Do?
The general-purpose, high-level Java programming language is a
powerful software platform. Every full implementation of the Java
platform gives you the following features:
• Development Tools
• Application Programming Interface (API)
• Deployment Technologies
• User Interface Toolkits
• Integration Libraries
7
Variable
An item of data named by an identifier. Each variable has a type, such as
int or Object, and a scope. See also class variable, instance variable, local
variable.
8
Keyword
Data
Type
Identifier
public
private
protected
int
float
char
number
value
alphabet
Keyword
The Java(TM) programming
language sets aside words as
keywords - these words are
reserved by the language itself and
therefore are not available as
names for variables or methods.
9
Public
A Java(TM) programming language keyword used in a
method or variable declaration. It signifies that the method
or variable can be accessed by elements residing in other
classes
10
Private
A Java(TM) programming language keyword used in a
method or variable declaration. It signifies that the method
or variable can only be accessed by other elements of its
class
11
Protected
A Java(TM) programming language keyword used in a
method or variable declaration. It signifies that the method
or variable can only be accessed by elements residing in
its class, subclasses, or classes in the same package
12
Data Type
The Java programming language is
statically-typed, which means that all
variables must first be declared before they
can be used
13
Data Type Default Value
Byte 0
Short 0
Int 0
Long 0L
Float 0.0f
Double 0.0d
Char ‘u0000’
String Null
boolean False
int gear = 1;
14
Identifier
The name of an item in a program written in the Java(TM) programming
language
Operator
Operator is a sign used to carry out an operation. There are several
types of operators that can be used, namely:
• Arithmetic
• Assignment
• Relational
• Logic
15
Thank You, Next …
Control Structure
Study Program of Informatics
Faculty of Engineering and Computer Science
SY. 2019-2020
Andi Nurkholis, S.Kom., M.Kom.
March 2, 2020

Object Oriented Programming - 3. Java Programming

  • 1.
    Object Oriented Programming Andi Nurkholis,S.Kom., M.Kom. Study Program of Informatics Faculty of Engineering and Computer Science SY. 2019-2020 March 2, 2020
  • 2.
  • 3.
    Java History Java isan object-oriented programming language developed by James Gosling and colleagues at Sun Microsystems in the early 1990s. Java was started as a project called "Oak" by James Gosling in June 1991. Gosling’s goals were to implement a virtual machine and a language that had a familiar C-like notation but with greater uniformity and simplicity than C/C++. The first public implementation was Java 1.0 in 1995. 3
  • 4.
    4 Java Structure An overviewof the software development process
  • 5.
    Java Virtual Machine Throughthe Java VM, the same application is capable of running on multiple platforms. 5
  • 6.
    Java Platform The Javaplatform has two components: • The Java Virtual Machine • The Java Application Programming Interface (API) 6
  • 7.
    What Can JavaTechnology Do? The general-purpose, high-level Java programming language is a powerful software platform. Every full implementation of the Java platform gives you the following features: • Development Tools • Application Programming Interface (API) • Deployment Technologies • User Interface Toolkits • Integration Libraries 7
  • 8.
    Variable An item ofdata named by an identifier. Each variable has a type, such as int or Object, and a scope. See also class variable, instance variable, local variable. 8 Keyword Data Type Identifier public private protected int float char number value alphabet
  • 9.
    Keyword The Java(TM) programming languagesets aside words as keywords - these words are reserved by the language itself and therefore are not available as names for variables or methods. 9
  • 10.
    Public A Java(TM) programminglanguage keyword used in a method or variable declaration. It signifies that the method or variable can be accessed by elements residing in other classes 10
  • 11.
    Private A Java(TM) programminglanguage keyword used in a method or variable declaration. It signifies that the method or variable can only be accessed by other elements of its class 11
  • 12.
    Protected A Java(TM) programminglanguage keyword used in a method or variable declaration. It signifies that the method or variable can only be accessed by elements residing in its class, subclasses, or classes in the same package 12
  • 13.
    Data Type The Javaprogramming language is statically-typed, which means that all variables must first be declared before they can be used 13 Data Type Default Value Byte 0 Short 0 Int 0 Long 0L Float 0.0f Double 0.0d Char ‘u0000’ String Null boolean False int gear = 1;
  • 14.
    14 Identifier The name ofan item in a program written in the Java(TM) programming language
  • 15.
    Operator Operator is asign used to carry out an operation. There are several types of operators that can be used, namely: • Arithmetic • Assignment • Relational • Logic 15
  • 16.
    Thank You, Next… Control Structure Study Program of Informatics Faculty of Engineering and Computer Science SY. 2019-2020 Andi Nurkholis, S.Kom., M.Kom. March 2, 2020