GEMS Quiz

GEMS Quiz

University

39 Qs

quiz-placeholder

Similar activities

ASAS 2024- PENDIDIKAN PANCASILA

ASAS 2024- PENDIDIKAN PANCASILA

7th Grade - University

40 Qs

Kapita Selekta UAS

Kapita Selekta UAS

University

40 Qs

B Using

B Using

6th Grade - University

39 Qs

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

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

University

42 Qs

Ulangan Harian 4 Jensi Teks: Editorial, Artikel, Kritik, Esai 1

Ulangan Harian 4 Jensi Teks: Editorial, Artikel, Kritik, Esai 1

12th Grade - University

40 Qs

TOEFL - SWE Skills 27-29

TOEFL - SWE Skills 27-29

University

35 Qs

Workkeys Test 8/29/25

Workkeys Test 8/29/25

12th Grade - University

35 Qs

Diritto amministrativo (quiz#002-40)

Diritto amministrativo (quiz#002-40)

KG - Professional Development

40 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?