Professional Documents
Culture Documents
INTRODUCTION TO JAVA:
7. Give the meaning of public static void main (String s[]) (jan-
2008) 4Marks.
11. Explain with examples the usage of: i) >>> ii) % iii) iv) >>
(Jul-2009) (Jan-2009) 8 marks
13. What are the different (data) types available in java? (May-
2007) 6Marks.
21. Write a java program to find the area and volume of a room. Use
a base class rectangle with a constructor and a method for
finding the area. Use its subclass room with a constructor that
gets the value of length and breadth from the base class and
has a method to find the volume. Create an object of the class
room and obtain the area and volume. (jan-2006) 8Marks
31. Write a java program to find the distance between two points
whose coordinates are given. The coordinates can be 2-
dimensional or 3-dimensional (for comparing the distance
between 2D and a 3D point, the 3D point, the 3D x and y
components must be divided by z). Demonstrate method
overriding in this program. (May-2007) 10Marks
37. What are interfaces? What are their benefits? Give the general
form of a class that implements interfaces. (jan-2006)
6Marks
41. What is a package? What are the steps involved in creating user
defined packages? Explain with an example (jun-2008)
10Marks
42. What is the difference between the String class and String
Buffer classes in Java? Write a java program to initialize an
array of strings with the days of the week and sort the array in
ascending order. (jan-2006) (jun-2006) (jan-2008)
8Marks
44. Describe the methods that can be used to search a sub string
in a given string (May-2007) 4Marks
50. Develop an applet that receives three numeric value form the
user and displays biggest of them on the screen. Write a HTML
page to test the applet (jan-2005) (jan-2007) 10Marks.
52. What are applets? What is the order in which the applet
methods are called? (jan-2006) 5Marks.
54. Explain the following graphics methods: draw Line, draw ARC,
and draw Polygon. (May-2007) 6Marks.
58. Define package. What are the steps involved in creating user-
defined package with an example. (Jan-2009) 6 marks
}
}
Class P1
{
public static void main (string a[ ] )
{
a x = new a( );
try
{
system.out.println(x.div( ));
}
catch (Exception e)
{
system.out.println(“100%”);
try
{
throw new NullPointerException (“OK”);
}
catch (Exception ae)
{
system.out.println(“Fail”);
}
}
finally {system.out.println (“pass”);}
}
} (Jan-2009) 06 marks
65. What are input and output streams? Explain them with
illustrations. (Jan-2009) 7 marks
77. List and explain major tasks of input and output streams.
(jan-2005) 10Marks
79. What are the different methods supported by input stream and
output stream classes. (jan-2007) 5Marks.
SWINGS:
86. How swing is built in AWT.
92. Explain how static and dynamic web pages are served (06 marks)
93. Explain how PLAF (Pluggable Look And Feel) is supported by
Swing.
JToggleButton.
A. JButton B. JToggleButton
101. Write a program which draws ten lines whose end points are
tabular format.