Comp Sci Unit Test

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards

equal to

==

2
New cards

not equal to

!=

3
New cards

greater than

>

4
New cards

greater than or equal to

>=

5
New cards

less than 

<

6
New cards

less than or equal to

<=

7
New cards

if statement variable a equals b

if(a==b)

{

}

8
New cards

if statement string answer equals address variable ignoring cap letters

if(answer.equalsIgnoreCase(address))
{
}

9
New cards

if statement string answer equals Ottawa ignoring caps

if(answer.equalsIgnoreCase(“Ottawa”)

{
}

10
New cards

convert String holiday = “Thanksgiving” to char letter 4

letter = holiday.charAt(4);

11
New cards

convert String holiday = “Thanksgiving" to length

int length = holiday.length();

12
New cards

or

||

13
New cards

and

&&

14
New cards

not

!

15
New cards

switch limits

ONLY FOR ints, chars, String; no logical operations

16
New cards

switch example country not variable

switch (country)

{

case (“Canada”):

case (“canada”):

{

System.out.println(“You chose Canada”);

break;

}

default:

{

System.out.println(“invalid country”);

break;

}

}

17
New cards

initializing char variable letter

letter = scanS.nextLine( ).charAt(0);