jj
class that provides methods for inputting words, numbers and other data (what we use when we need input from the user)
Scanner
sytax for declaring dcanner and create scanner that reads from system in
Scanner keyboard = new Scanner (system.in)
what happens without perantheses
according to the rules of precedence
to initialize the scanner class we have to
declare / define a scanner object/ variable named "Keyboard"
when one of the operands a floating point type and the other is an int what is the result
floating point type
to import sanner
import.java.util.Scanner;
scanner is provided by
java.util, which is a pachage
% is called
mod operator
variables and numbers in athi,etic operators are called
operands
arthimitic expression combines
operands, operators, parentheses
two types of increment and decrement
prefix and postfix and are not the same thing
the combination of an operator with the = used for assigment form is called a (combing assigment and arithmetic operators)
shorthand assigment opearator ex: amount = amount + 5; = amount +=5;
when unary operators have equal precedence what happense
the operator on the right acts before the left
when dividing by an int the result is
truncated not rounded