Core Java and JDBC - QUIZ 1

Core Java and JDBC - QUIZ 1

37 Qs

quiz-placeholder

Similar activities

สอบปลายภาค Mobile Application

สอบปลายภาค Mobile Application

KG - University

40 Qs

Retake Unit 6 WH

Retake Unit 6 WH

9th Grade

38 Qs

Chapter 5 Test 2024

Chapter 5 Test 2024

KG - University

35 Qs

Math Vocabulary

Math Vocabulary

KG - University

35 Qs

Waves and Sound

Waves and Sound

8th Grade

35 Qs

(BIL) Unit 4: Public Opinion and Voting

(BIL) Unit 4: Public Opinion and Voting

9th - 12th Grade

38 Qs

Unit 1: Biochemistry

Unit 1: Biochemistry

10th Grade

33 Qs

I.- Evaluación Sistema Operativo

I.- Evaluación Sistema Operativo

KG - University

41 Qs

Core Java and JDBC - QUIZ 1

Core Java and JDBC - QUIZ 1

Assessment

Quiz

others

Practice Problem

Medium

Created by

shilpa.hiremath shilpa.hiremath

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

37 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the below statements?

public class Test {

public static void main(String[] args)
{
String s1 = null;
System.out.println(s1); //line 2
System.out.println(s1.toString()); //line 3
}
}

a) null null

b) null NullPointerException

c) NullPointerException NullPointerException

d) None

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following methods is used to perform DML statements in JDBC?

executeResult()

executeQuery()

executeUpdate()

execute()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which class is used to read text from the console in Java?

a) SystemInReader
b) ConsoleReader
c) InputStreamReader
d) Scanner

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Media Image

What is the output of the following Java program?

a) 0 1 2
b) 0 1 2 3 4
c) 0 1
d) 0 1 2 3 4 5

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which exception is thrown when a string cannot be converted to a numeric type?

a) NumberFormatException
b) ClassCastException
c) IllegalArgumentException
d) ArrayIndexOutOfBoundsException

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which package contains the JDBC API?

java.jdbc

java.db

java.sql

java.oracle

java.mysql

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the purpose of the join() method in Java?

A. To pause the execution of the current thread
B. To join two or more threads together
C. To wait for a thread to complete its execution
D. To terminate a thread

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?