5 Library Classes
String, Math, Random
Oracle Academy Section
Section 4: Java Methods and Library Classes
Lesson 3: The String Class
Lesson 4: The Random Class
Lesson 5: The Math Class
Section 4 Quiz 2 (Lessons 3-5)
Java Foundations Certification Exam Topics
Working with the String Class
Format Strings using escape sequences including %d, %n, and %s
Working with the Random and Math Classes
Use the Random class
Use the Math class
Key Resources
Tutorials Point
Math class (for absolute value, rounding, rounding down (floor), rounding up (ceiling), and more)
Udemy
Bucky's Room
Math Class Methods (4:50)
Random Number Generator (5:14)
Supplemental Resources
Java Documentation:
Most Important Concepts / Code
String formatting
// %d decimal number
// %n line break
// %s a string
System.out.format("the %s jumped %n over the %s, %d times %n", "cow", "moon", 2);
Random
// create random object, only do this once
Random randomGen = new Random();
// get next int value, you can do this as many times as you want
// nextInt will return an int between 0 (inclusive) and the specified value (exclusive)
System.out.println("Next int value: " + randomGen.nextInt(10000));
Hour 1
Quiz and Concepts Review
String class
Precision
StringBuilder
Random class
Math class
abs
floor
ceil
pow
Hour 2
GitHub Project - Kanban