Course Summary
Introduction to Java™ training course introduces students to Java programming language and OOP (object oriented programming) concepts.
Students will learn the syntax and the constructs of the Java programming language, Java object-oriented programming (OOP) concepts, packaging, Java documentation, exception handling, and more.
Duration
3 days.
Objectives
Upon completion of this course, the students will be able to:
- Explain what Java is, what it is composed of, how it compares to other programming environments, what its advantages are, and how to install and configure the development environment.
- Read as well as write Java syntax, including declarations, assignments, operators, flow-control structures, generics, annotations, enumerations, naming conventions, etc.
- Understand object oriented programming principles, explain how OOP differs from structural programming, and discuss the advantages of OOP
- Utilize OOP in Java by designing and writing Java classes, encapsulating logic, reusing existing code through inheritance/polymorphism and composition, and modeling real-world relationships between objects
- Package and organize Java code into classes and libraries (JARs)
- Read, understand, and write Java code documentation (JavaDoc)
- Define and handle error conditions in Java through the use of exceptions
Audience
This course is intended for individuals who wish to learn how to design, build, debug, and support Java applications. This includes software developers, quality assurance engineers, technical writers, web developers, technical managers and individuals with a technical, non-programming background, such as system administrators.
This course is also appropriate for beginner programmers and those programmers who prefer to start learning the Java programming language from the fundamentals. It is helpful for individuals to have had some programming experience, whether with a scripting language such as Perl or a third generation language (such as Basic or C).
While this course does not assume that students have any programming experience, prior exposure to other structural and/or object-oriented languages is very beneficial. To get the full value from this course, the participants should be able to:
- Define common computer terminology
- Solve basic mathematical or technical problems
- Understand the concept of a variable
- Execute commands using a command-line interface
Additional Notes
This course is typically taught using Eclipse Integrated Development Environment (IDE). Students are shown how to install/setup Eclipse as well as how to utilize its most common features to increase their productivity. If so requested, we can also deliver the training using other IDEs, such as NetBeans, IDEA, JDeveloper, and others.
Java™ and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
Outline
About Java
- History of Java
- What is Java?
- Why Java?
- State of Java today
HelloWorld
- Installing and configuring Java Virtual Machine (lab)
- Implementing HelloWorld in Java (lab)
- Java class/file structure and naming conventions
- Java keywords and identifiers
- Compiling and running Java programs
- Comments in Java code
- The main() method
- Installing and configuring the Eclipse IDE
Data Types
- Declaring and assigning variables
- Primitive Java types
- Conversion between types
- Introduction to arrays and strings
Operators
- Arithmetic operators - including shortcut operators
- Relational operators
- Logical-boolean operators
- Bitwise operators
- Assignment operators
- Additional operators
- Operator precedence
Flow Control
- Local variable storage: stack
- Branching statements: if-else and switch
- Loop statements: while and for
- Break and continue statements - including labeled
- Return statement
- Lab: Calculator
Object Oriented Programming
- What is OOP?
- Why OOP?
- Class vs. Object
- OOP in Java: classes, fields, objects, methods
- Java memory model and garbage collection
- Static vs. instance data and methods
- Constructors - including constructor and method overloading
- Constants
- Encapsulation through access modifiers
- Lab: BankAccount
- Inheritance / in Java
- Types and subtypes
- Lab: School
- Interfaces and abstract classes / in Java
- Lab: OOP Calculator
- java.lang.Object: super class of them all
- Object Equality: equals() and hashCode() methods
- Converting objects to strings: toString() method
- Lab: Comparing students
Packaging
- Reasons for packaging code
- Packages and sub-packages in Java
- Protecting package namespace
- Using packaged code
- Protecting packaged code
- Java CLASSPATH
- Java Archive (JAR)
- Lab: Packaging
JavaDoc
- Overview of JavaDoc
- Java API
- Defining and generating JavaDoc
- Lab: Documenting Java code
Exception Handling
- What are exceptions?
- Why exceptions?
- Built-in exceptions
- Exception life-cycle
- Handling exceptions
- Throwing exceptions
- Exception types: checked vs. unchecked
- Creating new exceptions
- Grouping and nesting exceptions
- Lab: Exceptions
java.lang library (Core Java)
- Primitive wrappers
- String and StringBuffer/StringBuilder
- java.lang.Math
- java.lang.System
- Multi-threaded programming in Java