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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is a loop

A

used to run code more than once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

give examples of loops

A

while loop , for loop , do while loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

give an example on instantiating an object.

A

Cat Tom = new Cat(“Tom”);
Point p1 = new Point(0,1);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly