Java Library Classes and Packages
☰Fullscreen
Table of Content:
- Question 1: What is the difference between byte oriented IO and character oriented IO ? How are these two performed in Java ?
- Question 2: Which class buffers the input received from an InputStreamReader object?
- Question 3: Which package is by default imported in every Java program?
- Question 4: Name the block that encloses the code that may encounter anomalous situations.
- Question 5: In which block can you throw the exception?
- Question 6: Which block traps and handles an exception?
- Question 7: Can one catch block sufficiently trap and handle multiple exceptions?
- Question 8: Which block is always executed no matter which exception is thrown?
- Question 9: NumberFormatException is subclass of which exception class?
- Question 10: IOException is subclass of which exception class?
- Question 11:
What is the role of
(i) throws keyword?
(ii) throw keyword? - Question 12: Why is exception handling necessary?
- Question 13: Difference between equals() and equalsIgnoreCase() string functions?
- Question 14: Difference between length() and capacity() string functions?
- Question 15: The default package is a package without any name and is imported for you.
- Question 16: Name the class that translates data bytes received from InputStream objects into a stream of characters.
- Question 17: Which class stores the information about the connection between an input device and the computer or program?
- Question 18: Which streams are by default available in a Java program?
- Question 19: What is an exception ?
- Question 20: When is Exception Handling required ?
- Question 21: What is the function of catch block in exception handling ? Where does it appear in a program ?
- Question 22: What are the advantages of exception handling ?
- Question 23: When do use need multiple catch handlers ?
- Question 24: Differentiate between String and StringBuffer objects.
- Question 25: Given a package named EDU.Student, how would you import a class named Test contained in this package ? Write one line statement.
- Question 26: There are three classes that implement the DataInput and DataOutput interfaces. Two of them are DataInputStream and DataOutputStream. Which is the third one ?
- Question 27: What will be the output of the following code snippet when combined with suitable declarations and run ?
- Question 28: Give the output of the following program
- Question 29: Consider the following try .... catch block:
- Question 30: What is the output of the following code fragment if "abc" is passed as argument to the func( ) ?
- Question 31: Predefined classes are available in the form of _________.
- Question 32: Name the package you need to import for performing input and output.
- Question 33: Which command creates a package in Java?