1.6 is Scanner class 1.7 is Casting

Scanner class will not be touched on in the AP Exam Makes coding fun though, which is why we do it 1.7 is all over the AP Exam. Type casting is important.

Scanner is not a primitive datatype its a reference datatype its a class every class has a constructor system.in is to grab the content from your keyboard when entered into the terminal

Casting explicitly is myInt = (int) myDouble Casting implicitly is double myDouble = myInt

Double / int = double int / int = int

casting double to int rounds it down only casting double to int this way rounds it however way it should be rounded (int) (myDouble + 0.5)