Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

SCJA-drills-chap02

QuestionAnswer
What does assignment statements do? Assignment statements assign values to variables.
What do assign values to variables? Assignment statements assign values to variables.
What happens if an assignment statement do not return boolean type when used as the expression in an if statment? Assignment statements that do not return boolean types will cause the compiler to report an error when used as the expression in an if statement.
What, related to invalid literals, can cause a compiler error? Trying to save an invalid literal to a declared primitive type variable will result in a compiler error.
What are conditional statments used for? Conditional statements are used for determining the direction of flow based on conditions.
What are the conditional statements? Types of conditional statements include the if, if-then, if-then-else, and switch statements.
Where does the default statement of a switch can be placed? The default case statement can be placed anywhere in the body of the switch statement.
What must expressions used in if statments be evaluate to? The expressions used in if statements must evaluate to boolean values, or the application will fail to compile.
May Boolean wrapper classes be used in if statements? Motivate your answer? Boolean wrapper classes are allowed as expressions in if statements since they are unboxed.
What is unboxing, and what are the consequences related to their primitives? Remember that unboxing is the automatic production of primitive values from their related wrapper classes when the primitive value is required.
What are iteration statments? Iteration statements are designed for iterating through pieces of code.
Which iteration statements exist? Iteration statements include the for loop, enhanced for loop, and the while and do-while statements.
What are the main components of the for loop statement? The for loop statement has main components that include an initialization part, an expression part, and an update part.
What is the enhanced for loop statement used for? The enhanced for loop statement is used for iteration through an iterable object or array.
How would the code for a foreach loop look like in order to go through all of the String array str[]? for (String s : str) { //code }
What is the while loop statement based on? The while loop statement is used for iteration based on a condition.
Describe the do-while statement. The do-while statement is used for iteration based on a condition. The body of this statement is always executed at least once.
What the transfer of control statements do? Transfer of control statements interrupt or stop the flow of execution.
Which are the transfer of control statements? The transfer of control statements include the continue, break, and return statements.
What is the continue statement used for? The continue statement is used to terminate the current iteration of a do-while, while, or for loop, and then continue with the next iteration.
What is the break statement used for? The break statement is used to exit the body of a switch statement or loop.
What is the return statement used for? The return statement is used to exit a method and return a specified value.
What is a block? Give an example. A block is a sequence of statements within braces—for example, { int x=0; int y=1 }.
What are the pseudo-code used for? Pseudo-code allows algorithm designers to express computer programming algorithms in a human-readable format.
What does writing pseudo-code allow? Writing pseudo-code allows for the quick and focused production of algorithms based on logic, not language syntax.
How are pseudo-code algorithms written? Java keywords and statement usage structures are used when implementing pseudo-code algorithms.
Briefly describe the universally accepted standars for writing pseudo-code. There are no universally accepted standards for writing pseudo-code.
Created by: fd99
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards