0% found this document useful (0 votes)
3 views3 pages

Java QuestionBank MT

QUESTION BANK

Uploaded by

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

Java QuestionBank MT

QUESTION BANK

Uploaded by

spriya28.2005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Questions Bank

1. Method overloading
2. method overriding
3. checked and unchecked exceptions
4. operations
5. buzzwords
6. program structure
7.

8. What is the difference between compiler and Interpreter?


9. What are the features of object oriented programming language?
10. What is bytecode?
11. What is JVM?
12. Write different types of operators in java?
13. What is java token and different data types?
14. What are different types of variables in java?
15. What are different control structures or statements in Java?
16. What are jumping statements in Java?
17. Write syntax for single and multi dimensional array?
18. What is command line argument in Java. Give example?
19. Write the usage of Scannner class and BufferedReader Class using syntax and example?
20. Write difference between class and object?
21. What is constructor. Give example?
22. Write the use of static and this keywords using example?
23. What is array of objects?
24. What are access modifiers. Give example?
25. What is inheritance and types of inheritance?
26. What is polymorphism and differentiate static and dynamic polymorphism?
27. Differentiate method overloading and constructor overloading?
28. What is the purpose of ‘this’ keyword? Give an example
29. Explain the concept of inheritance with a real-life example.
30. How is encapsulation different from data abstractionWhat is the output of the following
Java code. int x = 10; if (x > 5) { if (x > 8) { System.out.println("x is greater than 8"); } else {
System.out.println("x is greater than 5 but less than or equal to 8"); } } else {
System.out.println("x is less than or equal to 5"); }
31. Create a Java program to manage student attendance. Define a class Student with
attributes for student name and attendance count. Include methods to mark attendance
and display attendance details. Demonstrate the functionality in the main method
32. Explain the following with an example: (a) Local variables in Java (b) Static variables in Java
(c) Class variables in Java (d) Static method in Java
33. Illustrate the use of variable-length arguments and command-line arguments in Java with
examples.
34. Explain the steps needed to connect to a database using JDBC.
35. Give the differences between checked and unchecked exceptions in Java.
36. Write a Java program to find the second largest element in an integer array.
37. Describe the concept of recursion in Java and its practical applications.
38. Create a Shape base class with a draw () method. Derive two Circle and Rectangle classes
that override the draw () method
39. Explain the difference between run time and compile time polymorphism using examples
40. Write a Program to accept N integer numbers from the command line. Raise and handle
exceptions when a number is greater than 1000 and less than 2000
41. What is a method overriding and how it is related to dynamic method dispatching?
42. Explain different string classes in java?
43. What is data abstraction and give example of an abstract class?
44. What is a package and java API package?
45. What is interface. Why is needed?
46. What is user defined package?
47. Write a syntax to access the package in java?
48. What is Exception?
49. What is the difference between exception and error. Give examples.
50. What are different types of exceptions?
51. What is runtime stack mechanism in Exception?
52. Explain hierarchy of exception class?
53. What is an inner class?
54. What is the use of java.io and java.util (collection framework) packages?

You might also like