
Best Practices in Java

Quiz
•
Computers
•
University
•
Medium
Alpana Sonje
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the correct way to resolve following error? @Override
public void run() { Thread.sleep(300); }
Surround with try/catch
Add throws declaration
Either A or B
None of the mentioned
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the suitable name for the method used to check whether given number is prime or not?
prime()
checkprime()
isPrime()
getPrime()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When we have constructor based and setter based injection defined within an entity then which will be called by default?
constructor
setter method
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is the default scope for beans in the spring?
Prototype
Singleton
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be output of following code?
public class ChildThread extends Thread {
@Override public void run() {
System.out.println("Hello"); }}
public class ThreadDemo {
public static void main(String[] args) {
ChildThread t1 = new ChildThread();
t1.start();
t1.start(); }}
Hello
Hello
Hello
CTE
RTE
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Can one interface implements another interface?
Yes
No
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is used to bind the metadata in hibernate?
SessionFactory
ServiceRegistry
Configuration
SessonRegistry
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
Java

Quiz
•
11th Grade - University
10 questions
Java Control Flow statements

Quiz
•
University
10 questions
Flutter Test 1

Quiz
•
University
12 questions
javaquizvivek

Quiz
•
University
15 questions
Round 4 - Harvest

Quiz
•
University
10 questions
На сколько ты знаешь C#

Quiz
•
University
10 questions
Java Quiz 1

Quiz
•
University
6 questions
Java Method Overloading

Quiz
•
University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade