IT 114: Introduction to Java
Class 42

Topics

Review

Final Exam

The final exam will be given on Friday, May 22nd starting at 11:30.

It will consist of questions like those on the quizzes, along with questions asking you to write short segments of Python code.

60% of the points on this exam will consist of questions from the Ungraded Class Quizzes.

Today's will be a review of the material covered up to the midterm.

The next class, our last, will review the material covered since the midterm.

You will only be responsible for the material in the Class Notes for these two review sessions,

The final will be an online exam.

At the moment I do not know the exact format that will be used, but I will send you an email with details on May 17th, the Sunday before the exam.

Review

Objects

Classes

Statements

Printing a Line in Java

Data Types

The Java Data Types

Variables

Declaring Variables

Assignment Statements

Literals

= Does Not Mean Equals

Java Is Case Sensitive

Printing Variables

Operators

Arithmetic Operators

The Mod Operator

Two Groups of Data Types

Strings

Concatenation

Concatenating Strings and Numbers

Expressions

Evaluating an Expression

Precedence

Escape Sequences

Control Structures

Loops

Code Blocks

The ++ and -- Operators

Order of Precedence for ++ and --

The for loop

Initializing the Loop Variable

The Loop Test

The Loop Update Statement

The for Loop in Action

for Loop Patterns

Keywords

Mixing Data Types

Integer Division

Defining Methods

Method Headers

Running a Method

Arguments and Parameters

Returning Values

Return Type in Method Header

Method Calls Can Be Expressions

The main Method

Getting Input from the Command Line

Converting Strings to Integers

Conditionals or Branches

The boolean Data Type

Relational Operators

if Statements

if/else Statements

Nested if Statements

if/ else if Statements

Relational Operator Precedence

Casting

Logical Operators

Truth Tables

Precedence of Logical Operators

The While Loop

The do/while Loop

Infinite Loops

Augmented Assignment Operators

Updated Order of Precedence

Storing More Than One Value

Getting Values from an Array

The Length of an Array

Creating an Array Object

Initializing Arrays

Changing Array Elements

What Is an Array Variable?

Objects

Strings

We Have Been Defining Unusual Classes

Two Kinds of Methods

Dot Notation

String Methods

charAt(index)

length()

split(text)

trim()

The Empty String

Strings Cannot Be Changed

Packages

Using Java Packages

Importing Packages

Using a Scanner Objects

Scanner Methods

Attendance