Java Programming - Intro
Oum Saokosal
Master’s Degree in information systems,Jeonju
University,South Korea
012 252 752 / 070 252 752
oumsaokosal@gmail.com
Contact Me
• Tel: 012 252 752 / 070 252 752
• Email: oumsaokosal@gmail.com
• FB Page: https://facebook.com/kosalgeek
• PPT: http://www.slideshare.net/oumsaokosal
• YouTube: https://www.youtube.com/user/oumsaokosal
• Twitter: https://twitter.com/okosal
• Web: http://kosalgeek.com
History
•JamesGosling and Sun Microsystems
•Oak
•Java, May 20, 1995, SunWorld
•JavaApplet
•Java SE,Java EE, Java Java ME
•Android uses Java, doesn’t use JVM
3
Features of Java
• Java is object-oriented
• Java is interpreted
• Java is architecture-neutral
• Java is portable
• Java is multithreaded
• Java is dynamic
4
Java IDETools
• Eclipse
• Netbeans
• IntelliJ IDEA
5
Getting Started with Java
Programming
•A SimpleJavaApplication
•Compiling Programs
•ExecutingApplications
6
A Simple Application
Example 1.1
//This application program prints Welcome
//to Java!
package chapter1;
public class Welcome {
public static void main(String[] args) {
System.out.println("Welcome to Java!");
}
}
7
ExecutingApplications
•Compile: javac Welcome.java
•Run: java Welcome.class
8
Java
Interpreter
on Windows
Java
Interpreter
on Sun Solaris
Java
Interpreter
on Linux
Bytecode
Java
Interpreter
on Mac OS
Comments
In Java,comments:
//this is a single line comment
/* this is
a multiline comment
*/
9
Reserved Words
Reservedwords or keywords:
- class
- public
- static
- void
- int
- package
10
Modifiers
public
private
protected
(default)
11
Classes
A class is a template or blueprint for
objects.
public class Welcome {
}
12
Methods
Method: a collection of statements
that performs a sequence of
operations
It can be used even without fully
understanding the details of how it
works.
13
main Method
The main method provides the control of
program flow.The Java interpreter executes
the application by invoking the main method.
The main method looks like this:
public static void main(String[] args)
{
// Statements;
} 14

Java OOP Programming language (Part 1) - Introduction to Java

  • 1.
    Java Programming -Intro Oum Saokosal Master’s Degree in information systems,Jeonju University,South Korea 012 252 752 / 070 252 752 oumsaokosal@gmail.com
  • 2.
    Contact Me • Tel:012 252 752 / 070 252 752 • Email: oumsaokosal@gmail.com • FB Page: https://facebook.com/kosalgeek • PPT: http://www.slideshare.net/oumsaokosal • YouTube: https://www.youtube.com/user/oumsaokosal • Twitter: https://twitter.com/okosal • Web: http://kosalgeek.com
  • 3.
    History •JamesGosling and SunMicrosystems •Oak •Java, May 20, 1995, SunWorld •JavaApplet •Java SE,Java EE, Java Java ME •Android uses Java, doesn’t use JVM 3
  • 4.
    Features of Java •Java is object-oriented • Java is interpreted • Java is architecture-neutral • Java is portable • Java is multithreaded • Java is dynamic 4
  • 5.
    Java IDETools • Eclipse •Netbeans • IntelliJ IDEA 5
  • 6.
    Getting Started withJava Programming •A SimpleJavaApplication •Compiling Programs •ExecutingApplications 6
  • 7.
    A Simple Application Example1.1 //This application program prints Welcome //to Java! package chapter1; public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); } } 7
  • 8.
    ExecutingApplications •Compile: javac Welcome.java •Run:java Welcome.class 8 Java Interpreter on Windows Java Interpreter on Sun Solaris Java Interpreter on Linux Bytecode Java Interpreter on Mac OS
  • 9.
    Comments In Java,comments: //this isa single line comment /* this is a multiline comment */ 9
  • 10.
    Reserved Words Reservedwords orkeywords: - class - public - static - void - int - package 10
  • 11.
  • 12.
    Classes A class isa template or blueprint for objects. public class Welcome { } 12
  • 13.
    Methods Method: a collectionof statements that performs a sequence of operations It can be used even without fully understanding the details of how it works. 13
  • 14.
    main Method The mainmethod provides the control of program flow.The Java interpreter executes the application by invoking the main method. The main method looks like this: public static void main(String[] args) { // Statements; } 14