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

Essential Java Interview Questions

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)
30 views3 pages

Essential Java Interview Questions

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 IMPORTANT QUESTIONS

2 marks questions.

1. What is a ternary operator? Give an example.


2. Define an object. Give an example.
3. Define polymorphism.
4. What is an abstract class?
5. What is an event?
6. What is an InputStream?
7. Define exception.

8. What is a constructor?
9. Differentiate between interfaces and abstract classes.
10. What is an applet?
11. What is an event? Mention types of events.
12. What are packages in Java?
13. What is the difference between String and StringBuffer?
14. What is the difference between this and super keywords?
15. Define abstract class.
16. Write any four methods of InputStream and OutputStream.
17. Write short notes on type casting in Java.
18. Define thread.
19. What is a stream.
20. What is bytecode?
21. What is vector?
22. What is multithreading?
23. What is symbolic constant? Give one example.
24. What is a scanner class?
25. What is finalize method?
5 MARKS:

1. Describe the structure of a Java program.


2. Explain the purpose of this keyword with an example.
3. Differentiate between a class and an interface.
4. Explain the life cycle of an applet.
5. Explain method overloading and method overriding.
6. What is a thread? Explain the life cycle of a thread.

7. What is inheritance? Explain types of inheritance in Java.

8. Explain any four methods of the Math class.

[Link] is exception handling in Java?


10. Explain try–catch–finally with an example.

[Link] the features of Java.

12. What is a constructor?


13. What are the rules of defining a constructor?

14. What are the differences between method overloading and method overriding?

15. Explain the life cycle of an applet.

16. Write the steps involved in creating a thread by extending the Thread class.

17. How do you create a user-defined exception?

18. Explain thread synchronization in Java.

[Link] types of operators in Java.

[Link] datatypes in java.

[Link] the types of Exceptions.

10 MARKS
1. What is method overloading? Explain with example and a program.
2. Explain the following:
i) Default constructor
ii) Parameterized constructor
iii) Copy constructor
3. a) Demonstrate method overriding with an example.
b) What is the difference between String class and String Buffer class? Give examples.

4 a) Explain all the access specifiers in Java.


b) Explain the applet life cycle with a neat diagram.

5 a) What is a class? Explain object creation in Java with an example.


b) What is an array? Explain arrays in Java with an example.

6 a) Explain constructor overloading with example.


b) What are I/O streams in Java?

7 a) Explain the life cycle of a Thread class.


b) Mention important mathematical functions of the Math class with examples.

8 a) Explain methods of the String class.


b) What is inheritance? Discuss various types of inheritance.

9. a) Explain the process of creating a user-defined package with an example.

b) Explain mouse and keyboard events.

10. a) What is an array? How do you create an array in Java? Explain with an example.

11. a) Write a program to demonstrate interface implementation in java.

b) Explain how multithreading is implemented using Runnable interface.

12. a) Write a note on <APPLET> tag.

b) Explain scope and lifetime of variables in Java with examples.

You might also like