Java Questions
Java Questions
1)What is JDK?
2)Which is the latest version of JAVA?
3)Explain the advantages of JAVA?
4)Explain JAVAC and JAVA Commands and which folder they are available?
5)What is signature of main method?
6)Explain keyword?list some keywords in JAVA?
7)Explain identifiers in JAVA?
8)Explain about Literals?
9)Explain why JAVA is platform independent?
10)Is JVM platform independent?
11)Explain the difference between compliler and interpreter?
13)What is Rule and Convention?
14)Explain about JRE?
15)explain variables in JAVA and Different types of Variables?
16)Mention all the primitive datatypes in java?
17)Explain about primitive variables?
18)Explain Reference variables?
19)What is String in java?
20)Explain Methods in JAVA and why we use Methods?
21)Write the general Syntax for a method?
22)What is the Default execution method in java?
23)Can we Execute Java Program without main method?
24)Can we Compile Java Program without main method?
Inheritance
Polymorphism
Abstraction
** can we initialize final global variables in static and non-static blocks?
73)explain about Abstract methods?
74)what is an Abstract class?
75)Explain why we cannot Instantiate an Abstract class?
76)What is the rule to be followed by the Subclass of an Abstract class?
77)Can abstract Class inherit from another abstract class?
78)Is abstract class 100% abstract ?explain?
79)Explain an interface in java?
80)what is the difference between Abstract class and interface?
81)Does Abstract class have Constructors?if yes why?
82)Do interfaces have constructors?
83)can we instantiate an interface?
84)Explain about implements keyword in java?
85)Can an interface inherit from another interface?
86)Explain Abstraction,Steps to achieve Abstraction and its advantages?
87)Can we develop final methods in interface?
88)Can we develop a final abstract class?
89)can we Develop a static method in abstract class?
90)can we just declare a variable in interface without initializing?
Encapsulation
Libraries
Object class
String in java
Collection
111)Explain List,Set,Queue type of collection?
112)list out the differences between List,Set,Queue type of collection?
113)Explain the features of ArrayList,LinkedList ?
114)Explain the features HashSet,LinkedHashSet and TreeSet?
115)Explain generics and how to apply it to collection?
116)Explain Boxing and Unboxing in Java?
117)What are Wrapper classes and why its is required?
Exception
118)Explain Exceptions in java?
119)Explain how to handle exceptions?
120)Explain Checked Exceptions and unchecked Exceptions?
121)list out the difference between checked Exceptions and unchecked Exceptions?
122)list out the differences between "throw" and "throws" keywords?
123)Explain the use of finnaly block?
124)Explain the different ways of handling Checked Exceptions?
125)What is the Difference between final ,finally,finalize() in java?
Programming questions:
Collections
7. Write a java program to find the duplicate words and their number of occurrences in a
string?
8. Write a program to reverse the given string word wise?
10. Write a java program to count the total number of occurrences of a given character in a
string?
11. Write a java program to count the number of occurrences of each character in a
string?
12. Write a java program to remove all white spaces from a string?
14. Write a program to check whether given two strings are anagrams? 15.
Write a java program to reverse each word of a given string?
Arrays: