FROM MY NOTES Flashcards
1
Q
state prgramming errors and describe them
A
syntax error - related to grammar of java
runtime - happens when running our program
logical - related to the programmer
2
Q
what is a loop
A
used to run code more than once.
3
Q
give examples of loops
A
while loop , for loop , do while loop
4
Q
what do methods do
A
divides our code into smaller pieces.
less code in main method
adv - promotes easy debugging
program will be easier to undersatnd
5
Q
give an example on instantiating an object.
A
Cat Tom = new Cat(“Tom”);
Point p1 = new Point(0,1);