Question Bank-Java
Question Bank-Java
1. List some of the differences between C, C++ and java programming languages.
2. List and explain features (or) buzz words of java.
3. Write a program in java to find the Fibonacci sequence of any given number. Write the
output also.
4. Explain in detail the working of Java virtual Machine (JVM).
5. Write a note on: (a) Java, Internet and World Wide Web (b) Web Browsers
6. Develop a program that will take a string from a command line argument and check whether
it is a palindrome or not.
7. With the help of syntax and example, explain any eight methods that are supported by the
String class
8. Briefly explain about Wrapper Classes. (or) Explain the concept of auto-boxing and auto-
unboxing.
9. What is meant by string arrays? Discuss with a sample Java Program.
10. Explain two-dimensional array. Write a java program to find the transpose of a matrix.
11. Explain one-dimensional array with an example program.
12. What is a vector. Explain four methods of vector class with example.
13. Write a java program to perform matrix multiplication? (Read the inputs through Scanner
class).
14. Write a java program to find min and max number in a given array.
MODULE - 2
1. What is a constructor? How can we overload the constructors, Explain with example along
with the output.
2. Explain the concept of method overloading with example.
3. What is inheritance? Explain the types of inheritance supported by java with example.
4. Explain the importance of following in java programming with example:
5. (a) static block (b) static variable (c) final keyword
6. Define Class and Object with examples?
7. Write a java program that demonstrates abstract class.
8. Write a note on visibility control in java.
9. Write a note on finalize method.
10. What is an Exception? Explain various Exception Types?
11. What is meant by Exception handling? In java how the Exceptions are handled? Explain?
12. Explain about 'throw' and 'throws' keyword.
13. Write a program to demonstrate multiple catch statements and finally.
14. What is custom exception (user-defined exception)? Write a program to implement the
concept of user defined exception.
15. Write a note on errors.
16. Differentiate checked exceptions with un-checked exceptions?
MODULE - 3
1. Write a java program that demonstrates interfaces concept?
2. Write a java program to implement multiple inheritance using interfaces?
3. Define nested interfaces. Explain the same with an example.
4. With an example explain how a single class will extends another class and provide
implementation for one or more interfaces.
5. Define package. Explain few built-in packages in brief and show how the built-in packages
are imported.
6. What are the categories of packages in java? Explain about package hierarchy in java?
7. Explain the concept of user-defined package and also explain how to import the same.
8. Write a program to find the roots of a quadratic equation using interface and packages.
• Declare an interface in package Quad1.
• Declare another package Quad2 and implement the interface.
9. Define thread. Explain the life cycle of a thread in detail.
10. Explain the different ways of creating a thread?
11. Write a java program that creates a thread by extending the Thread class?
12. Explain about thread priorities in java?
13. Write a java program that creates a thread by implementing the Runnable interface?
14. What is synchronization? Explain Synchronization methods and blocks?
15. Explain about yield( ),join( ),sleep( ) methods with examples?
16. Write a java program to create multiple threads?
MODULE - 4
1. Explain applet life cycle in detail?
2. Explain the ways to create an applet with example?
3. How to pass parameters to an applet? Explain with an example?
4. What is an applet? Explain the hierarchy of an applet?
5. Explain the steps to develop an applet?
6. Explain the steps involved in designing a web page.
7. Briefly explain some of the HTML tags.
8. With an example explain how an applet will receive input from the user.
MODULE - 5
1. Explain about Graphics class and its methods with examples?
2. What is Graphic class and list out its importance in java?
3. With an example explain how to create a panel.
4. Explain about event-driven programming.
5. With an example explain layouts.
6. Explain the concept of frames with an example.
7. Write a note on:
a) Jbutton b) JCheckBox c) JTextArea d) JList
8. Explain the following methods with an example program
a) drawRect() b) drawLine() c) drawOval()
9. What is Swing? Explain few swing components in detail.
10. Briefly explain InetAddress class.
11. Explain about URL class and its methods with examples.
12. Explain about Socket class and its methods with suitable example.