Java Ch. 5

Card Set Information

Author:
senator77
ID:
110713
Filename:
Java Ch. 5
Updated:
2011-10-25 14:23:47
Tags:
java chapter increment decrement operators
Folders:

Description:
Java Ch. 5
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user senator77 on FreezingBlue Flashcards. What would you like to do?


  1. The mode which the operator is placed after the variable is called:
    postfix mode.
  2. The mode which the operator is placed before the variable is called:
    prefix mode.
  3. A control structure that causes a statement or group of statements to repeat is called:
    a loop.
  4. The while loop has 2 important parts:
    1 - a boolean expression that is tested for a true or false value.

    2 - a statement or block of statements that is repeated as long as the expression is true.
  5. The loop header consists of of the key word while followed by:
    a boolean expression enclosed in parentheses.
  6. A repetition of a loop is known as:
    an iteration.
  7. The loop that continues to repeat until the program is interrupted is called:
    an infinite loop.
  8. The process of inspecting data given to a program by the user and determining if it is valid is called:
    input validation.
  9. The read operation that takes place just before the loop is called:
    a priming read.
  10. The do-while loop uses a posttest loop which means:
    its boolean expression is tested after each iteration.
  11. The loop that is ideal for performing a known number of iterations is:
    a for loop.
  12. The loop that executes as long as a particular condition exists is
    a conditional loop.
  13. A loop that repeats a specific number of times is known as:
    a count-controlled loop.
  14. In Java, the loop that is ideal for writing count-controlled loops is:
    a for loop.
  15. The first line of the for loop is known as:
    the loop header.
  16. The running total is a sum of numbers that accumulates with each iteration of a loop.
  17. The variable used to keep the running total is called:
    an accumulator.
  18. The name of the value that signals when the end of a list of a values has been reached is called:
    a sentinal.
  19. A variable intialized with a starting string then accumulates a sum of numbers by having the numbers added to it is called:
    an accumulator.
  20. A special value that cannot be mistaken as a member of the list and signals that there are no more values to be entered is:
    the sentinal value.
  21. A loop that is inside another loop is called:
    a nested loop.
  22. The statement that causes a loop to terminate early is:
    the break statement.
  23. The statement that causes a loop to stop its current iteration and begin the next one is:
    the continue statement.
  24. What will the println statement in the following program segment display?

    int x = 5;
    System.out.println(x++);
    5
  25. In the expression number x++, the ++ operator is in what mode?
    postfix mode
  26. This is the variable that controls the number of iterations performed by a loop.
    loop control variable
  27. The do-while loop is this type of loop.
    posttest loop
  28. This type of loop has no way of ending and repeats until the program is interrupted.
    infinite loop
  29. This expression is executed by the for loop only once, regardless of the number of iterations.
    intialization expression
  30. This is a special value that signals when there are no more items from a list of items to be processsed. This value cannot be mistaken as an item from the list.
    sentinal value
  31. To open a file for reading, you use the following classes.
    File and Scanner
  32. This class allows you to use the print and println methods to write data to a file.
    PrintWriter class
  33. The while loop is a pretest loop (true or false).
    True
  34. The for loop is a posttest loop (true or false).
    False
  35. One limitation of the for loop is that only one variable may be initialized in the initialization expression (true or false).
    True

What would you like to do?

Home > Flashcards > Print Preview