
testquiz

Quiz
•
Information Technology (IT)
•
University
•
Hard
Ahmad Awais
Used 3+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code?
int[] arr = {2, 4, 6, 8};
System.out.println(arr[arr.length - 2]);
2
6
8
4
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which component would best be used for multiline text input in Swing?
JTextField
JTextArea
JPasswordField
JLabel
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is true about 2D arrays?
All rows must be the same length
You can't use indexes with them
They can only be declared dynamically
They can be jagged
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What does the following recursive function return?
int func(int n) {
if (n <= 0) return 1;
return n * func(n - 1); }
System.out.println(func(3));
3
9
6
1
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
In exception handling, finally block:
Executes only if an exception occurs
Never executes
Always executes
Executes after catch only
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following can be used to catch an exception?
try-catch
catch-finally
try-finally
throw-catch
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which method is used to write text to a file?
File.read()
File.write()
write() of FileWriter
Scanner.next()
Create a free account and access millions of resources
Similar Resources on Wayground
24 questions
OOP ppp

Quiz
•
University
25 questions
G9-Introduction to Python Programming

Quiz
•
9th Grade - University
20 questions
Decode the Tech Emoji

Quiz
•
University
25 questions
Fundamentals of programming Quiz

Quiz
•
University
25 questions
SAS Dasar Program Keahlian RPL Kelas X

Quiz
•
10th Grade - University
20 questions
Pretest Alpro Dasar

Quiz
•
University
30 questions
PPL (QUIZ 4) Programming Control Structures

Quiz
•
University
25 questions
PPL (Quiz 5) Procedures and Functions

Quiz
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade