JAVA Chapter 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

1 Describe the following string class methods with examples : (i) length( ) (ii)

charAt( ) (iii) CompareTo( ) iv) indexOf ( ) v) subString ( ) vi) repalce ( ) (vii)


compareTo( ) (viii) equalsIgnoreCase( )
2 Explain this keyword with suitable example.
3 Explain two dimensional array in Java with example.
4 Give four differences between strings class and string buffer class.
5 Explain dynamic method dispatch.
6 Explain class variables with suitable example.
7 What is inheritance? List types of inheritance and explain single level inheritance
with example.
8 Differentiate between array and vector.
9 Differentiate between Input stream class and Reader class.
10 What is use of super and final with respect to inheritance ? OR State the use of
‘super’ and ‘final’ keyword w.r.t. inheritance with example. OR What is importance
of super and this keyword in inheritance ? Illustrate with suitable example. OR State
three uses of final keyword. OR Describe final method and final variable with respect
to inheritance. OR State the use of final keyword w.r.t. a method and the variable
with suitable example.
11 Describe following methods related to vector add Element ( ), removeElement() &
insert Element At ( ).
12 Define a class and object. Write syntax to create class and object with an example.
13 Which are the restrictions present for static declared methods ?
14 Explain byte stream class in detail.
15 Enlist types of constructor. Explain any two with example. OR Define constructor.
Explain parameterized constructor with example.
16 Explain method overriding with suitable example.
17 Write a single program to implement inheritance and polymorphism in java.
18
What is the use of wrapper classes in Java ? Explain float wrapper with its methods.
19 What is Iterator class ? Give syntax and use of any two methods of Iterator class.
20 What is garbage collection in Java ? Explain finalize method in Java.
21 What is the use of new operator ? Is it necessary to be used whenever object of
the class is created ? Why ?
22
Draw the hierarchy of Writer stream classes, and hierarchy of Reader stream classes.
23 What are stream classes ? List any two input stream classes from character stream.
OR What are streams ? Write any two methods of character stream classes.
24 What is use of Array list class? State any 3 methods with their use from Array List.
25 Explain serialization with stream classes.
26 Explain abstract class with suitable example.
27 What is use of stream classes ? Write any two methods FileReader class.
28 What is final variable and method ? How it is different from abstract method ?

You might also like