
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
22 questions
Unit-8 (QB64) Year-6

Quiz
•
6th Grade - University
25 questions
THIRD ROUND BINGO

Quiz
•
University
20 questions
Test Android

Quiz
•
University
20 questions
Mastering Algorithmic Challenges

Quiz
•
University
30 questions
Week 7-8

Quiz
•
University
20 questions
Decode the Tech Emoji

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

Quiz
•
University
20 questions
Informatika Analisis Data Bab 6

Quiz
•
10th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University