Categories
Computer

– Which of the following package needs to be import while handling files?

► java.util
► java.io Click here For Detail
► java.awt
► javax.swing

Categories
Computer

– Exceptions must be handled while handling files otherwise it may lead to _____

► Logical error
► Syntax error
► Run-time error (Page 70)
► No error

Categories
Computer

All the exceptions and errors in java are inherited from _____ class

► Exception
► Error
► Throwable Click here For Detail
► IOException

Categories
Computer

Which of the following exception belongs to a category of un-checked exception?

► IOException
► Null Pointer exception     Click here For Detail
► AWTException
► ClassNotFoundException

Categories
Computer

Which of the following belongs to a category of checked exception?

► Null Pointer exception
► IOException Click here For Detail
► Array index out of bounds
► NumberFormatException

Categories
Computer

There are _________ types of exceptions in Java

► 2 (Page 72)
► 3
► 4
► 5

Categories
Computer

– Window frame and dialog use ________ as their default layout.

► Border layout Click here For Detail
► Flow layout
► GridBag layout
► Grid layout

Categories
Computer

– Which of the following syntax is used to attach an input stream to console?

► FileReader fr = new FileReader(‘ input.txt ‘) ; (Page 77)
► FileReader fr = new FileReader(FileDescriptor.in);
► FileReader fr = new FileReader(FileDescriptor);
► FileReader fr = new FileReader(console);

Categories
Computer

– A collection can store………

► Homogenous objects
► Heterogeneous objects
► Objects as well as primitive values
► At most 100 objects

Categories
Computer

Which of the following is used for inheritance in java?

►implements
►extends
: (colon) Click here For Detail
► inherit