Midterm 1 Study Guide
Topics
- Java syntax
- variable declaration: primitive vs. reference
- definition and usage: static, final
- variable and method name convention
- object instantiation
- variable initialzation
- mathematical operations
- if-else statements, logical operators (&&, ||)
- iterations (for loops and while loops)
- Class
- class name
- class variables
- instance variables
- constructors (special methods that return objects)
- methods
- visibility modifiers: public, private
- Methods
- calling static methods
- calling non-static methods
- method structure
- return type
- parameters
- array/ArrayList
- how to create an array vs. ArrayList
- how to access elements in an array vs. ArrayList
- length vs. size()
- NullPointerException in Object array and ArrayList
- how to create and use 2-dimensional array
- Scanner
- How to instantiate a Scanner object with keyboard input
- How to instantiate a Scanner object with a file
- How to read a word/line/number from Scanner object
- Strings
- equals() vs ==
- + operator