CS 140 Lecture Notes - Lecture 3: Control Flow, Boolean Expression, Call Stack
Document Summary
Println will turn things into strings to print: two string method. Doesn"t care about indentation (use it tho it makes your code neater) the dot doesn"t have to be in the same line as a method or variable: ex evolution . stubstring(1,4); //it can be on a totally different line. If an else statement is there it skips to else. There can also be an else if for multiple cases checked after if in order: while(boolean expression){statement} Boolean expression check if something is true or false. Checks the boolean expression is done as long as boolean is true: do{program}while(boolean exp) Like the while loop but will always do the program at least once: for(init; bool exp; incriment){program} You must initialize variables, the prog checks bool exp to see if true. If true it"ll go through program once then increment. Mostly declare counter then check then increment. Java gives default constructor but can be changed.