• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/29

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

29 Cards in this Set

  • Front
  • Back

Can a switch statement evaluate decimals?

No

Can a switch statement use relational operators?

No you can only test for equality using the reality operator "=="

What is an indeterminate loop situation?

Where we do not know in advance how many times we may have to repeat the loop

What type of loop is favoured for an indeterminate situation?

While or do-while

What is a determinate loop situation

We know how many times the loop needs to run

What type of loop if preferred for a determinate situation

For or a counter controlled while

What does lcc stand for

Loop continuation condition

How do you get an infinite loop

When there is no code to eventually cause the loop continuation condition to become false

What is a sentinel value

A value that when entered will cause the lcc to become false and terminate the program

What is a do-while loop often used as?

A data validation loop because it's guaranteed to run at least once

When is the for loop used?

When we know how many times we want the loop to execute

What does the continue keyword do?

Stop the current iteration for the loop and start again

What is an array?

A named set of contiguous memory cells

Can you use two different day types within one array?

No

What are these called []

Array index operator

Are arrays objects?

Yes, they are declared and instantiated

Can you change the size of the array once it has been created?

No it is immutable

What is the shortcut to populate an array?

{"data", "data1", "data2"...}

What will java automatically assign to each element when an array is created?

The Unicode character of 'u0000' if numeric and NULL if string

What happens when you try to read values past the last elements of an array

Java will throw an exception

How can you be sure that a loo won't read beyond the end of an array

Use the length() method

What will happen if you use a less than or equal to operator in a loop lcc containing an array?

It will send you out of bounds, you should always use the less than operator

How does the math.random() method work

Returns a double value ranging from 0.0 up to 0.99999...

How do you get into values from the math.random method

Multiply and cast ex... int randomInt = (int)(Math.random()*10);

Why are arrays homogeneous data structures?

They can only store data of one type

What is an ArrayList?

An array on steroids

How is an ArrayList different than an array

It is heterogenous and elastic

Why is an ArrayList heterogenous

Because it holds the references to memory addresses of objects instead of the actual objects

How is an ArrayList elastic

If you fill up all the slots, it automatically creates new ones