Introduction To Java (2-Day Class)
Java's motto is write once, run anywhere; code that runs on one platform need not be recompiled for a different platform. Older code runs on the most JVMs with the speed advantage of the latest profiling, native code translating, and memory management.
Prerequisites: No previous programming or Java background is required.
A general-purpose, concurrent, class-based, object-oriented programming Language, Java is designed to be portable across different platforms. It tries to have as few implementation dependencies as possible. Java follows many of the syntactic conventions of C and C++.
The course will cover the syntax, data structures, common classes, and common techniques of Java programming.
The course is set up in a lab-like environment. Students will learn Java by working through instructor-led exercises and examples that will introduce them to each new topic.
Topics covered include:
Basics
- Hello World program in Java
- Command-line compile using javac
- Command-line deployment using jar
- CLASSPATH
Basic Syntax
- Structure of program
- Comments
- Statements
- Assignments
- Calling methods on objects
- Calling methods on classes
Primitive Data Types
- Println statement
- Variables, types, assignment
- Numeric types: integer, floating-point
- Integer literals
- Floating-point literals
- Numeric operators: + / * %
- Assignment operators, increment/decrement operators
- Relational operators: < > <= >= == !=
- Boolean type
- Boolean operators: && || !
Strings
- Character literals
- String literals
- Escaped characters: \n \t \\ \" \'
- String operators: + +=
- Accessing string characters
- String comparison and equality
Control Structures
- If, If-Else
- Ternary operator: a ? b : c
- While, Do-While, For
Arrays and Collections
- Array literals
- Manipulating array elements
University IT Technology Training classes are only available to Stanford University staff, faculty, or students. A valid SUNet ID is needed in order to enroll in a class.
Custom training workshops are available for this program
Technology training sessions structured around individual or group learning objectives. Learn more about custom training.
Special Group Rates
For groups of 5 or more, special rates are available. Please contact techtraining@stanford.edu for more details.
University IT Technology Training sessions are available to a wide range of participants, including Stanford University staff, faculty, students, and employees of Stanford Hospitals & Clinics, such as Stanford Health Care, Stanford Health Care Tri-Valley, Stanford Medicine Partners, and Stanford Medicine Children's Health.
Additionally, some of these programs are open to interested individuals not affiliated with Stanford, allowing for broader community engagement and learning opportunities.
