
FT1 - App
Authored by Vinston Raja
Computers
University
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
char ch = 'AB'; Error cause?
Too many characters for char
Missing quotes
Java allows multi-char in char
None
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
String s = "Hello; Error cause?
String cannot have semicolon
Missing ending double quote
Use single quotes for strings
None
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
int num = 5; if(num > 2) System.out.println("Big") else System.out.println("Small"); Error cause?
Missing braces
Missing semicolon after println
Missing semicolon after System.out.println("Big")
None
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
float f = 3.5; Error cause?
Cannot assign double to float without casting
Missing F suffix or cast
Java automatically converts
None
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
for(int i=0; i<5; i++) for(int j=0; j<5; i++) System.out.println(i + "," + j); Problem?
Infinite loop
Compile error
Off-by-one
None
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
String s = "Java"; s.charAt(4); Result?
a
v
IndexOutOfBoundsException
Compile error
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
int a = 5; switch(a){ case 1: System.out.println("One"); default: System.out.println("Default"); case 5: System.out.println("Five"); } Output?
One Default Five
Default Five
Five only
Default only
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?