GEMS Quiz

GEMS Quiz

University

39 Qs

quiz-placeholder

Similar activities

chương trình con

chương trình con

1st Grade - University

43 Qs

Pháp luật đại cương 01

Pháp luật đại cương 01

University

42 Qs

DSA mid-term revision (FIT HANU) pt. 2

DSA mid-term revision (FIT HANU) pt. 2

University

38 Qs

TRY OUT 1 2019 MATHEMATICS IPS

TRY OUT 1 2019 MATHEMATICS IPS

12th Grade - University

40 Qs

Vong1_ICONChallenge_170320

Vong1_ICONChallenge_170320

University

35 Qs

Las Fijas RV - Evaluación de Avance 2

Las Fijas RV - Evaluación de Avance 2

University

44 Qs

UAS STRATEGI PEMBELAJARAN

UAS STRATEGI PEMBELAJARAN

University

40 Qs

Révision JAVA/SQL

Révision JAVA/SQL

University

36 Qs

GEMS Quiz

GEMS Quiz

Assessment

Quiz

Education

University

Easy

Created by

Suyog M

Used 1+ times

FREE Resource

39 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

What is the difference between String and StringBuilder in Java?
a) String is mutable, and StringBuilder is immutable
b) String is thread-safe, and StringBuilder is not
c) String is faster than StringBuilder
d) String has more methods than StringBuilder

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

How do you handle exceptions in Java?
a) Using throws keyword
b) Using try-catch blocks
c) Ignoring exceptions
d) Using finally block

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of JUnit's @Test annotation?
a) It specifies the order of execution
b) It marks a method as a test case
c) It defines a timeout for the test
d) It skips the test case

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

How can you create a custom exception in Java?
a) By extending RuntimeException
b) By implementing the Exception interface
c) By using the throw keyword
d) By calling System.exit()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the use of static keyword in Java?
a) To define a variable with constant value
b) To create objects of a class
c) To access class members without creating an instance
d) To implement singleton pattern

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you write a for loop in Java?
a) for (int i = 0; i < n; i++)
b) for (int i = n; i >= 0; i--)
c) for (int i = 1; i <= n; i++)
d) for (int i = n; i > 0; i--)

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of the equals() method in Java?
a) To compare two objects for identity
b) To compare two objects for equality
c) To check if an object is null
d) To clone an object

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?