Using while loops and variables in a Java program

  1. Every Java program is inside a class.
    The name of this class is: ____________________________
  2. In a class there can be many different methods. Each does a different job. The one method required to start a standard Java program is: ______________________
  3. int is short for _______________ which means a _____________ number.
  4. When you declare a variable you create a temporary ______________ __________________________ which you assign a name to.
  5. In this program the variable count starts out equal to ________
  6. A while loop will keep repeating as long as its condition is true.
    What is the condition of this loop? ________________________________
  7. What should the conditon be to print values from 2 through 12? _____________________________
  8. System.out.print(count) will print out ____________________________.
  9. System.out.print("count") will print out _____________________________
  10. System.out.println(count) will print out __________________________________________
  11. count = count + 2;
    is bad math. No number equals itself plus 2.
    But in programming you compute the value on the right and store the answer into the variable on the left.
    The first time through the loop count started out = 2.
    count + 2 = _______________
    after calcuating the equation the answer is stored ___________________________
  12. What would the output of this program be?
    	int trace = 5;
        while(trace <=20){
           System.out.print(trace);
           System.out.print(" ");
        }
      _____________________________________________________________________
      _____________________________________________________________________
          
  13. What would the output of this program be?
    	int trace = 5;
        while(trace <=20){
           System.out.println(trace);
           System.out.print(" ");
           trace = trace + 5;
        }
      _____________________________________________________________________
      _____________________________________________________________________