πŸ’‘ Jump to Important Questions ↓

Important Questions

Important Questions

Programming in Java

Asked in 2082Short Question5 Marks
1.
How do you access file randomly? Give an example. [5]
Asked in 2082Long Question10 Marks
2.
List some features of Java. What are the types of exception? Write a program to take input an integer from the user and if the given integer is negative throw the exception. [10]
Asked in 2081Short Question5 Marks
3.
Define package. What is the use of final keyword and finally block? [5]
Asked in 2081Long Question10 Marks
4.
How do you create inner class and anonymous inner class? Create a class EMPLOYEE with data members Emp_ID, Name and Occupation, and write those objects to the file DOC.DAT whose occupations is doctor. [10]
Asked in 2080Short Question5 Marks
5.
Write short notes on a. Final keyword b. Object class [5]
Asked in 2080Short Question5 Marks
6.
Describe about exception handlings with example. [5]
Asked in 2080Short Question5 Marks
7.
Write a Java program to create a multi-threaded programs by extending Thread class. Create at least three threads. [5]
Asked in 2080Short Question5 Marks
8.
Describe the chain of constructor with example. [5]
Asked in 2080Long Question10 Marks
9.
Why do we need interface? Define an interface named shape with area ( ) method. Create a class named Rectangle with length and breadth circle with radius that implements shape interface. Now create the object of both classes and display their area. [10]
ModelShort Question5 Marks
10.
Write short notes on a. Container Classes b. Scope of JSP Objects [5]
ModelShort Question5 Marks
11.
Write a java program to read content from keyboard and write it to the file named test.txt in D: drive. [5]
ModelShort Question5 Marks
12.
What is method overloading? Explain with example. [5]
ModelLong Question10 Marks
13.
Discuss the concept of method overriding. Write a program to create Person class with variables id, and name. Include methods getPerson() and showPerson() in the class. Again, create another class named Employee, which is child of person class. Include member variable salary, and methods getEmployee(), and showEmployee() in the class. Again, create a third class named Typist, which is child of Employee. Include variable typespeed, and methods getTypist(), and showTypist() in the class. Finally, create two objects of Typist class and read and display their details. [10]