wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ADVANCED JAVA WEEK 11 TO 14

Total questions: 50

Worksheet time: 26mins

Name
Class
Date
1.

It is a problem that arises during the execution of a program

a)

Exceptions

b)

JVM

c)

Throwable

d)

FileReader

2.

It is the exception that occurs at the compile time.

a)

Checked exceptions

b)

IOException

c)

FileNotFoundException

d)

Unchecked exceptions

3.

It is an exception that occurs at the time of execution.

a)

Unchecked exception

b)

ArrayIndexOutOfBoundsExceptionexception

c)

Runtime exceptions

d)

IOException

4.

It indicates serious problem that a reasonable application should not try to catch

a)

NullPointerException

b)

Exception

c)

Error

d)

RuntimeException

5.

It indicates conditions that a reasonable application might try to catch

a)

NullPointerException

b)

Exception

c)

Error

d)

RuntimeException

6.

All exception and errors types are subclasses of class (a)  

7.

There is an important subclass of Exception, called (a)   this type are automatically defined for the programs that you write and include things such as division by zero and invalid array indexing.

8.

It is the most general and represents any type of error that can occur when performing I/O.

a)

FileNotFoundException

b)

NullPointerException

c)

RuntimeException

d)

IOException

9.

This exception means that a file could not be located on disk.

a)

FileNotFoundException

b)

NullPointerException

c)

RuntimeException

d)

IOException

10.

It a block that contains set of statements where an exception can occur

a)

Catch block

b)

Try catch

c)

Try block

d)

Multiple Catch

11.

It is a block where handle the exceptions are handled

a)

Catch block

b)

Try catch

c)

Try block

d)

Multiple Catch

12.

It is the keyword that is used for handling checked exceptions

a)

Exceptions

b)

Syntax

c)

Finally

d)

Throws

13.

It is the keyword that is used to create a block of code that follows a try block.

a)

Exceptions

b)

Syntax

c)

Finally

d)

Throws

14.

This exception is defined or customed by programmer

a)

ArithmeticException

b)

User-defined exception

c)

NullPointerException

d)

IOException

15.

It is a collection of statements that are grouped together to perform an operation.

a)

Method

b)

System

c)

Statements

d)

Operation

16.

It is defined in the method header are known as formal parameters.

a)

Parameters

b)

Argument

c)

Variables

d)

Signature

17.

It is a method that does not return any value

a)

Void

b)

Grade

c)

Java

d)

Score

18.

It is a statement that is not needed for a void method

a)

Void

b)

Method

c)

Syntax

d)

Return

19.

The power of a method is its ability to work with parameters

a)

True

b)

False

20.

You can use println to print any string and max to find the maximum between any two int values

a)

True

b)

False

21.

The arguments must match the parameters in order, number, and compatible type, as defined in the method signature.

a)

True

b)

False

22.

Compatible type means invoke a method with a parameter

a)

True

b)

False

23.

Swap is a program that demonstrates the effect of passing by value

a)

True

b)

False

24.

The min method that was used earlier works only with the int data type

a)

True

b)

False

25.

The local of a variable is the part of the program where the variable can be referenced

a)

True

b)

False

26.

A scope variable must be declared before it can be used

a)

True

b)

False

27.

_______ in Java are a way of grouping similar types of classes together

a)

Exception

b)

Packages

c)

Thread

d)

Error

28.

The concept of package can be considered as means to achieve data ________

a)

Inheritance

b)

Encapsulation

c)

Polymorpsm

d)

Abstraction

29.

It is the packages which come as a part of Java Runtime Environment

a)

Pre-defined packages

b)

User-defined packages

c)

Java Runtime Environment

d)

Standard

30.

It is the packages defined by programmers to bundle group of related classes

a)

Pre-defined packages

b)

User-defined packages

c)

Java Runtime Environment

d)

Standard

31.

It is a default package which contain primitive data type

a)

java.lang

b)

java.awt

c)

java.io

d)

java.applet

32.

It is used for developing file handling application

a)

java.lang

b)

java.awt

c)

java.io

d)

java.applet

33.

It the package that is use for developing GUI

a)

java.lang

b)

java.awt

c)

java.io

d)

java.applet

34.

It the package that is used for developing browser oriented application

a)

java.lang

b)

java.awt

c)

java.io

d)

java.applet

35.

It the package that is used for developing client server application

a)

java.net

b)

java.util

c)

java.sql

d)

java.beans

36.

It the package that contains utility classes which implement data structure

a)

java.net

b)

java.util

c)

java.sql

d)

java.beans

37.

It the package that is used retrieving data from the database

a)

java.net

b)

java.util

c)

java.sql

d)

java.beans

38.

It the package that contains classes and interfaces related to JavaBeans components

a)

java.net

b)

java.util

c)

java.sql

d)

java.beans

39.

It the package that provides classes for performing artbitrary-precision interger arithmetic

a)

java.math

b)

java.nio

c)

java.rmi

d)

java.text

40.

It the package that defines buffers

a)

java.math

b)

java.nio

c)

java.rmi

d)

java.text

41.

It the package that is a mechanism that enables an object on one Java Virtual Machine to invoke methods

a)

java.math

b)

java.nio

c)

java.rmi

d)

java.text

42.

It the package that is used for formatting date and time on day to day business operations

a)

java.math

b)

java.nio

c)

java.rmi

d)

java.text

43.

It the package that provides the classes and interfaces for security framework

a)

java.security

b)

java.time

c)

java.rmi

d)

java.text

44.

It the package that used for dates, times, instants, and duration

a)

java.security

b)

java.time

c)

java.rmi

d)

java.text

45.

It refers to a computers ability to perform multiple jobs concurrently

a)

Multitasking:

b)

Multithreading

c)

Application

d)

Threads

46.

It is a multiple sequence of execution within a program

a)

Multithreading

b)

Multitasking

c)

Thread

d)

Application

47.

It is the thread method that creates a new thread and makes it runnable

a)

yield()

b)

void stop()

c)

void run()

d)

void start()

48.

It is the thread method where the new thread begins its life inside this method

a)

yield()

b)

void stop()

c)

void run()

d)

void start()

49.

It is the thread method where the thread is being terminated

a)

yield()

b)

void stop()

c)

void run()

d)

void start()

50.

It is the thread method that causes the currently executing thread object to temporarily pause and allow other threads to execute

a)

yield()

b)

void stop()

c)

void run()

d)

void start()