Best Practices in Java

Best Practices in Java

University

10 Qs

quiz-placeholder

Similar activities

OOP - Java Classes

OOP - Java Classes

12th Grade - University

15 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

oops using java quiz

oops using java quiz

University

15 Qs

Java Control Flow statements

Java Control Flow statements

University

10 Qs

Java Multithreading_Wrapperclass

Java Multithreading_Wrapperclass

University

15 Qs

javaquizvivek

javaquizvivek

University

12 Qs

Applet Java

Applet Java

University

10 Qs

Java Bootcamp Day 4

Java Bootcamp Day 4

University

15 Qs

Best Practices in Java

Best Practices in Java

Assessment

Quiz

Computers

University

Medium

Created by

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

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?

Discover more resources for Computers