Best Practices in Java

Best Practices in Java

University

10 Qs

quiz-placeholder

Similar activities

EC335 - Quiz 1

EC335 - Quiz 1

University

10 Qs

scratch 4

scratch 4

4th Grade - University

13 Qs

Applet Java

Applet Java

University

10 Qs

INTRO & PRINCIPLES OF TVC (W1-W3)

INTRO & PRINCIPLES OF TVC (W1-W3)

University

10 Qs

Computer Science Quiz

Computer Science Quiz

University

15 Qs

Tutorium1

Tutorium1

University

10 Qs

Operating System

Operating System

University

15 Qs

Java Control Flow statements

Java Control Flow statements

University

10 Qs

Best Practices in Java

Best Practices in Java

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Alpana Sonje

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?