stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
AP Computer Science Basics Formative Flashcards | StudBud
Explore
/
AP Computer Science Basics Formative
AP Computer Science Basics Formative
14 terms
·
StudBud Administration
·
12 plays
Covers Java basics, data types, boolean expressions, control statements, string functions
Flashcards
14 cards
F
Practice quiz
P
Host live
L
Questions
14
Answers
1
What is the value of the following expression: Math.sqrt(16)
4
{4,-4}
4.0
2
In Java, the method selector is represented by the ____.
period (.)
plus (+)
semicolon (;)
colon (:)
3
What is the maximum decimal number represented by a byte?
1
255
256
512
4
What is the output: System.out.println("Bob".compareTo("BOB") < 0);
True
False
5
How many iterations will the following loop have: for (int i=0; i < 5; i++){continue;}
0
6
5
1
6
To end the most immediate loop prematurely, you insert the ______ keyword.
continue
break
return
end
7
What is i
immediately
after the last iteration? for(int i=0; i<10;i++){}
i=9
i=10
i does not exist!
i=11
8
Evaluate the following for A=2, B=-4: (A >= B) && (A*B > 0)
0
FALSE
-1
TRUE
9
What is the value of "bob".indexOf(b);
1
2
0
{0,2}
10
What is the output of the following code: System.out.println(4/3)
1
4
1.3333333333333
1.3
11
The javac compiler converts _____ to _____.
.byte to .java
.java to .javac
.java to .byte
.java to .class
12
Evaluate the following for A,B = TRUE: !(!(A&&B) || (A==FALSE))
TRUE
FALSE
13
How many iterations will the following loop have: for(int i=1; i<5; i++){if (i%3==0){break;}}
5
2
3
4
14
For loops and while loops are always interchangeable.
False
True