Important Questions of JAVA

1.   What is OOP? Discuss the benefits of OOP?

2.   Write the difference between C, C++ and Java.

3.   Briefly discuss the history of Java.

4.   Discuss the various features of Java.

5.    Explain Features of java.

6.   What are the roles of Java compiler and interpreter?

7.    How do you define a class in Java?

8.   Distinguish between a class and an object.

9.   Explain encapsulation.

10.  Define debugging.

11.  What is class path?

12.  Compare abstraction and encapsulation.

13.  Define byte code.

14.  What is JVM?

15.  What are the roles of JVM?

16.  How does Java Byte code differ from machine code?

17.  Define garbage collection.

18.  What is Unicode?

19.  What is JDK? Describe various JDK tools in brief.

20.  Explain architecture of java.

21.  What is the purpose of JAR (Java Archive) tool?

22.  Why java is called platform independent language? Explain

            Or

Java is Platform Independent. Justify.

23.  What are identifiers? Explain them with suitable example.

24.  What is variable? List out rules for variable naming in Java.

25.  What are data types? What are different data types supported in java?

26.  What are the various data types available in Java? Explain.

27.  What are the various primitive data types available in Java? Also specify memory requirements and range of each.

28. What are separators? List various separators used in Java along with their purpose.

29.  How arrays are declared in a Java program?

30.  What are various types of arrays? Give syntax of creating each of them.

31.  Can arrays be initialized at the same time they are defined? If yes, explain its syntax with suitable example.

32.  Write the structure of a typical Java program.

33.  What is the task of main method in Java program?

34.  What is the difference between int and Integer?

35.  What is a class? Describe the syntax for declaring a class with an example.

36.  What are objects? Describe the syntax of defining objects with example.

37.  What are classes and objects? How are they created in Java? Explain with syntax and example.

38.  How do you create instance of a class and refer to them.

39.  What are instance and class variable?

40.  What is a reference variable?

41.  Explain in detail various input and output stream and their corresponding classes in Java.

42.  Explain how java supports encapsulation and data abstraction.

43.  Discuss parameter passing by value and by reference in java with suitable examples.

44.  How local variable is differ from an instance variable?

45.  What type of parameter passing does Java support?

46.  Primitive data types are passed by reference or pass by value?

47.  Objects are passed by value or by reference?

48.  Define constructor? What is the use of constructor?

49.  What are constructors? Explain with example.

50.  What is a constructor? Explain its properties. Can they be overloaded? If yes then explain it with suitable example.

Or

          Is it possible to overload a constructor? Justify your answer using example.

51.  What is the difference between constructor and method?

52. What are constructors? Discuss the features and various types. Also write java program for parameterized constructors.

53. When will you need to use this keyword inside a constructor? Show by example.

54.  Does Java provide a default copy constructor? Explain your answer with suitable example.

55.  What are parameterized constructor?

56.  Define polymorphism. How it is implemented in Java?

57.  What is method overloading? What things should be kept in mind while overloading a method?

58.  How can we access methods and variables outside the class? Explain it with suitable example.

59.  Define access modifier. Explain with example.

60.  What are access modifiers? Which is default access modifier?

61.  When do we use protected access specifier?

62.  Write short notes on—

a. Exceptions

b. JVM

c. Polymorphism

d. Applet

e. Finalized

63.  What is inheritance? What are the different forms of inheritance in Java? Explain with suitable example.

64.  What are overriding methods?

65. What do you mean by method overloading? How is it different from method overriding? Explain with example.

66.  What is the role of ‘super’ keyword?

67.  State the purpose of ‘this’ keyword.

68.   What is the difference between this and super?

69.   What is the use of final?

70.  What is the purpose of final keyword?

71.   What is final block in Java?

72.   State the purpose of a static block.

73.  What are abstract classes? What is its use in Java?

74.  What are abstract classes? How does they differ from concrete classes? Can an abstract class be instantiated?  Can there be an abstract constructor. Explain with suitable example.

75.   Differentiate between abstract class and interface.

76.   What are wrapper classes?

77.   Compare String and StringBuffer classes.

78.  How you can achieve the feature of multiple inheritance in Java? Also write java program to implement multiple inheritance.

79.  Write a program to implement multiple inheritance using interfaces. Also explain the process.

80.   Define interface. What is the need of an interface in Java?

81.   What is interface in Java? How is interface implemented?

82.   What is the use of implements keyword?

83.  What are packages in Java? Explain with the help of example.

84.  What is a package? How it is created and used in Java? Explain in detail with syntax and example.

85.  Explain the life cycle of a thread.

86.  What are priorities of thread?

87.  What do you know about multithreading? How it is implemented in Java?

88. What is role of priorities in multithreading? What are its limitations? Explain with the help of an example. How do you set and get priority values for threads in Java?

89.   What do you understand by inter-thread communication in Java?

90.  Why do we need both run and start methods in multithreading. Can we achieve it with only run method? Explain.

91.  Discuss the process of synchronization of threads with an example.

92.  What is an exception? How it is different from an error? Is it possible to include your own exception in a program? Explain with suitable code for the purpose. Also discuss the use of finally block.

93.   How can we handle Exceptions in Java? Discuss.

94.   Explain the exception handling mechanism of Java. Name few exception handling classes. Why it is done?

95.   What is the role of stack in exception handling?

96.   Discuss in detail the throw and throwskeyword.

97.   Differentiate between checked and unchecked exception.

98.   Define Applet. What is appletviewer used for?

99.  What do you mean by Java Applet? How is an applet different from an application?

100.  Discuss the life cycle of an Applet. Discuss the steps involved in creating and running an Applet.

101.  How can we pass parameter to an applet?

        Or

Demonstrate how parameters are passed to an applet?

102. Can an applet class have a constructor? Explain.

 

 

Leave a Comment