The document contains 25 questions related to Java programming concepts such as exception handling, applet lifecycle, inheritance, modifiers like final and static, strings, arrays, packages, interfaces, exceptions and Swing components. It also contains 10 true/false statements related to operators, events, inheritance, strings, abstract classes, interfaces and exceptions in Java.
Download as DOCX, PDF, TXT or read online on Scribd
100%(2)100% found this document useful (2 votes)
3K views
Theory Questions Java
The document contains 25 questions related to Java programming concepts such as exception handling, applet lifecycle, inheritance, modifiers like final and static, strings, arrays, packages, interfaces, exceptions and Swing components. It also contains 10 true/false statements related to operators, events, inheritance, strings, abstract classes, interfaces and exceptions in Java.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
JAVA Previous Years Question:
1. Write exception handling mechanisms in JAVA. That is,
explain try catch finally block with an example. Also, describe Throwable and Exception classes. 2. Describe with diagram the life cycle of applet. 3. How do you pass parameter to a base class from a derived class in Java? 4. Explain final modifier in Java? 5. What is the purpose of instanceof keyword in Java? 6. Name the different methods in String class in Java? 7. Explain in brief the event handling mechanism in the SWING package of Java programming language. 8. Give an example of inner class. 9. What is final class? Why they are used? 10. What is the base class of all the classes in JAVA? Mention 3 of its important methods. 11. What are the differences between an interface and an abstract class? What kinds of fields and methods may be contained in Java interface? 12. How can you create packages in Java? What kind of classes can be grouped in a package? How your friends code can use classes in your package? 13. Do you think copy of an array can be created using assignment statement? Give reason for your answer. 14. Explain with examples instance variables and class variables. 15. Short note on package and import in Java. 16. Describe the <applet> HTML tag. 17. Explain Object class and its methods. 18. Mention 3 methods which are not in String class but in StringBuffer class. Why these methods are not defined in String class. 19. What is an interface? Why is an interface used in Java? What are the marker interfaces? Give two example of marker interface? 20. Short note on Layout Manager in Java Swing. 21. What is the difference between a String object and a StringBuffer object? 22. How can you convert an integer to a string and a string containing digits to an integer? 23. How can you define three classes X, Y, Z so that they belong to the same package, mypackage? How can a class V be defined in a package, anotherPackage, use a class X? 24. What is the base class of all exception objects in Java? 25. What are the base classes of the classes of JButton and JComponent? 26. What is the default layout manager for subclasses of Window? 27. Name 4 different methods in String class in Java. 28. State whether the following statements are TRUE or FALSE- I. Operators cannot be overloaded in Java. II. When mouse cursor is moved into the bounds of a GUI component a mouseOver event occurs. III. A field defined private in super class can be used in functions defined in a derived class. IV. A string object can be modified after it is created. V. Non static methods of the super class may be invoked by super keyword. VI. GridLayout class is the subclass of the class Component. VII. A class may implement multiple interfaces. VIII. An abstract class can be instantiated. IX. When a class implements marker interface then the class does not define any method for those interfaces. X. All user defined exception classes are derived from Exception class.