0% found this document useful (0 votes)
2 views2 pages

Java_Imp_Questions

The document contains a comprehensive list of important questions covering various topics in Java programming, organized into five units. Topics include primitive data types, object-oriented principles like encapsulation and inheritance, exception handling, multithreading, and GUI development with AWT and Swing. Each unit consists of multiple questions that require explanations, examples, and program demonstrations related to Java concepts.

Uploaded by

heema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Java_Imp_Questions

The document contains a comprehensive list of important questions covering various topics in Java programming, organized into five units. Topics include primitive data types, object-oriented principles like encapsulation and inheritance, exception handling, multithreading, and GUI development with AWT and Swing. Each unit consists of multiple questions that require explanations, examples, and program demonstrations related to Java concepts.

Uploaded by

heema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Important Questions

Unit-1
1. List the primitive data types available in Java and explain
2. List and explain the Java buzzwords in detail.
3. Explain string and string buffer class in Java
4. What is an array? How do you declare the array in java? Give examples
5. Write the significance of Java Virtual Machine and Byte Code.
6. What is the purpose of constructor in Java programming? Explain constructor overloading in
java.
7. What is encapsulation ? Explain the significance of public, protected and private access specifiers
in inheritance.
8. What is inheritance ? Demonstrate various forms of inheritance with suitable program segments.
How to prevent a class from inheritance?
9. What is polymorphism? Explain various forms of polymorphism(compile time(method
overloading) and run time(method overriding))
10. With suitable program segments examine the usage of “super‟ “final” and “this” keywords.

Unit-2
11. What is meant by data abstraction? How to achieve data abstraction(abstract classes and
interfaces) in java. How to inherit an extend interface to another?
12. Define a package. How to import packages? Explain with illustrations.
13. Distinguish between Byte Stream Classes and Character Stream Classes.
14. Demonstrate about File Output Stream and File Input Stream
15. Demonstrate about Reading console Input and Writing Console Output
16. Explain about Random access file operations with an example
17. Write java program to display the contents of file
18. Write a program to merge the content of two files (user’s contacts in a mobile) into a target file.
(or) Write a program to copy two files into a target file

Unit-3
19. What is an Exception? Explain about the different types of exceptions (Checked and UnChecked
Exceptions)used in Java.How is an Exception handled in JAVA? Give example. And also write the
advantages of using Exception handling mechanism in a program.
20. Write a program to illustrate the use of multiple catch blocks for a try block which processes the
arithmetic exception, generated by division-by-zero error and other exceptions like
NumberFormatException, ArrayIndexOutOfBoundsException, StringIndexOutOfBoundsException
21. Explain how to create your own exception in Java program with an example
22. Write a program to illustrate user defined exception that checks the internal and external marks
if the internal marks are greater than 40 it raise the exception “internal marks are exceed”, if the
external marks are greater than 60 exception is raised and display the message the “external
marks are exceed.”
23. What is Multitasking? Summarize the differences between thread-based multitasking and
process-based multitasking
24. What is thread? How to create multiple threads in a program? Explain with an example.
25. What is Multi-threading ? List the benefits of multi-threaded programming. Write a program for
multi-threading by setting names and priorities to threads.
26. Explain the Java thread model(Life Cycle of a Thread). Illustrate with an example.
27. What is synchronization? How to implement synchronization in Java. Justify the producer -
consumer problem using inter – thread communication.

Unit-4
28. Give overview of collections framework and benefits.
29. Show the differences between Array List and Vector in Collection framework.
30. Write a program to convert an ArrayList into an array.
31. How to implement Array List, Linked List , Vector , Stack in Java with examples.
32. What is different between Iterator and ListIterator? Explain different ways to iterate over a
list
33. Discuss the differences between HashList and HashMap, Set and List.

Unit-5

34. What is an Applet? Create a simple applet to display a smiley picture using Graphics class
methods.
35. What is Event Handling? Write a short note on delegation event model or Event Handling.
Limitations of AWT. Difference between AWT and Swings.
36. Demonstrates the different types of Event classes and Event Listeners supported by java.
37. (a) What is an adapter class? Demonstrate its role in event handling.
(b) What is Anonymous Inner classes. Demonstrate with an example
38. How the events of the mouse and keyboard can be handled? Explain with an example(V.Imp)
39. What is a layout manager? Explain various layout managers in JAVA. (V.Imp)
40. What is a Swing? Explain the Component Hierarchy of Swings. (V.Imp)
(a) Design a user interface to collect data from customer for opening an account in a bank. Use
all possible swing components and layout manager for your interface design
(b) Design a user interface to collect data from the student for admission application using
swing components.
41. Explain about MVC (Model View Controller) architecture. (V.Imp)

You might also like