println
ends the line of output
next output goes on the same line
printf
doesnt advance to next line
used to format
can have any number of arguments all of which are printed to the screen except the first - which is the formatting
formatitng with printf
(“%(-/+)(number of spaces)”.float spaces)
what is legaacy code
code that is old fashioned but too expensive to replace - printf is also in C
input
import java.util.Scanner Scanner scanner = new Scanner(System.in);
getting the info/user input using scanner
int numberofitems = scanner.nextInt()
String myword = scanner.nextLine()
read through pitfalls