Académique Documents
Professionnel Documents
Culture Documents
and Design
Instructors:
Anwar Abdalbari, PhD
Fall 2018
Faculty of Engineering and Applied Science
Object-Oriented Programming
and Problem Solving
Lecture Overview
Safe
Portable
Platform-independent
• Distributed as instructions for a virtual machine
Vast set of library packages
Designed for the Internet
Java Program Structure
File.java File.class
Development Environments
• Logical Errors
Errors (Cont.)
// comments
about the class
class header
class body
}
Main Function
• The modifiers public and static can be written in either order (public
static or static public), but the convention is to use public static.
• The main method is similar to the main function in C and C++, and it
is the entry point for your application.
A method call:
System.out.println("Hello, World!");