CSE 110 ASU
What is a constructor in java?
Creates an object from a class template but does not return a value
What is a for loop?
It repeats things like other programming statements and blocks of code automatically until it is false
Are classes public or private?
They can be both public and private
What is do while loop ?
This code is repeated until the condition becomes false.
What is a nested loop?
a loop inside another loop
What does the "Final" word do in Java?
a value that cannot be changed after it is created, a constant
what does a class contain in object oriented programming
constructors, methods, and variables
What does the syntax look like for a do while loop
do { Some code } while (condition);
What is the syntax for a for loop?
for(intial value; test condition; update;) { do some task; }
What is a while loop syntax?
int counter = 0 while (counter < someNum) { System.out.println(" Counter = " + counter); counter++; }
what is an example of a constructor in java?
public Staff (String firstname, String lastname) { //initialization of all key vairables }
What is an if/else statement?
test a certain condtion and stops when it finallly meets it
What is a method in java?
A block of code that performs a certain task
What is a class in coding
A blueprint of the building A class creates a custom data type which can be used within the code.