Introduction to Java
Data Types in Java
• Primitive data types:
• boolean
• char
• byte
• short
• int
• long
• float
• double
• Reference data types: classes, arrays, interfaces
Integer Division and Data Type Conversion
• Performing division on integer values will result in an integer answer
• Type casting can be done explicitly using constructor or type cast
operator
Graphical User Interface in Java
• JavaFX library for creating GUI applications
Generating Pseudorandom Values in Java
• java.util.Random class can be used to generate random values
Declaring and Initializing Variables
• Variables in Java need to be declared before using
• Initialization can be done while declaring
• Multiple variables of same data type can be declared in the same line
Accepting User Input with Scanners
• java.util.Scanner class can be used to accept user input
Data Types in Java
• Primitive data types:
• boolean
• char
• byte
• short
• int
• long
• float
• double
• Reference data types: classes, arrays, interfaces
Integer Division and Data Type Conversion
• Performing division on integer values will result in an integer answer
• Type casting can be done explicitly using constructor or type cast
operator
Graphical User Interface in Java
• JavaFX library for creating GUI applications
Generating Pseudorandom Values in Java
• java.util.Random class can be used to generate random values
Declaring and Initializing Variables
• Variables in Java need to be declared before using
• Initialization can be done while declaring
• Multiple variables of same data type can be declared in the same line
Accepting User Input with Scanners
• java.util.Scanner class can be used to accept user input