online tutorials www.ekalasala.com/twitter
eamcet mock tests icet results
online training,online tutoring
 
JAVA FAQ'S

 JAVA INTERVIEW QUESTIONS

1. What is the difference between an Interface and an Abstract class?
2. What is the purpose of garbage collection in Java, and when is it used? 
3. Describe synchronization in respect to multithreading.
4. Explain different way of using thread? 
5. What are pass by reference and passby value?
6. What is HashMap and Map?
7. Difference between HashMap and HashTable?
8. Difference between Vector and ArrayList?
9. Difference between Swing and Awt?
10. What is the difference between a constructor and a method?
11. What is an Iterator?
12. State the significance of public, private, protected, default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers.
13. What is an abstract class?
14. What is static in java?
15. What is final?
16. What if the main method is declared as private?
17. What if the static modifier is removed from the signature of the main method?
18. What if I write static public void instead of public static void?
19. What if I do not provide the String array as the argument to the method? 
20. What is the first argument of the String array in main method?
21. If I do not provide any arguments on the command line, then the String array of Main method will be empty or null?
22. How can one prove that the array is not null but empty using one line of code?
23. What environment variables do I need to set on my machine in order to be able to run Java programs?
24. Can an application have multiple classes having main method?
25. Can I have multiple main methods in the same class?
26. Do I need to import java.lang package any time? Why ?
27. Can I import same package/class twice? Will the JVM load the package twice at runtime?
28. What are Checked and UnChecked Exception?
29. What is Overriding?
30. What are different types of inner classes?
31. Are the imports checked for validity at compile time? e.g. will the code
 containing an import such as java.lang.ABCD compile?
32. Does importing a package imports the subpackages as well? e.g. Does importing com.MyTest.* also import com.MyTest.UnitTests.*?
33. What is the difference between declaring a variable and defining a variable?
34. What is the default value of an object reference declared as an instance variable? 
35. Can a top level class be private or protected?
36. What type of parameter passing does Java support?
37. Primitive data types are passed by reference or pass by value?
38. Objects are passed by value or by reference?
39. What is serialization?
40. How do I serialize an object to a file?
41. Which methods of Serializable interface should I implement?
42. How can I customize the seralization process? i.e. how can one have a control over the serialization process?
43. What is the common usage of serialization?
44. What is Externalizable interface?
45. When you serialize an object, what happens to the object references included in the object?
46. What one should take care of while serializing the object?
47. What happens to the static fields of a class during serialization?
48. Does Java provide any construct to find out the size of an object?
49. Give a simplest way to find out the time a method takes for execution without using any profiling tool?
50. What are wrapper classes?
51. Why do we need wrapper classes? 
52. What are checked exceptions?
53. What are runtime exceptions?
54. What is the difference between error and an exception??
55. How to create custom exceptions?
56. If I want an object of my class to be thrown as an exception object, what should I do?
57. If my class already extends from some other class what should I do if I wantan instance of my class to be thrown as an exception object?
58. How does an exception permeate through the code?
59. What are the different ways to handle exceptions?
60. What is the basic difference between the 2 approaches to exception handling...1> try catch block and 2> specifying the candidate exceptions in  the throws clause? When should you use which approach?
61. Is it necessary that each try block must be followed by a catch block?
62. If I write return at the end of the try block, will the finally block still execute?
63. If I write System.exit (0); at the end of the try block, will the finally block stillexecute?
64. How are Observer and Observable used?
65. What is synchronization and why is it important?
66. How does Java handle integer overflows and underflows?
67. Does garbage collection guarantee that a program will not run out of memory? 
68. What is the differrrrence between preemptive scheduling and time slicing?
69. When a thread is created and started, what is its initial state?
70. What is the purpose of finalization?
71. What is the Locale class?
72. What is the difference between a while statement and a do statement?
73. What is the difference between static and non-static variables?
74. How are this() and super() used with constructors?
75. What are synchronized methods and synchronized statements?
76. What is daemon thread and which method is used to create the daemon thread?
77. Can applets communicate with each other?
78. What are the steps in the JDBC connection?
79. How does a try statement determine which catch clause should be used to handle an exception?
80. Can an unreachable object become reachable again?
81. What method must be implemented by all threads?
82. What are synchronized methods and synchronized statements?
83. What is Externalizable? 
84. What modifiers are allowed for methods in an Interface?
85. What are some alternatives to inheritance?
86. What does it mean that a method or field is "static"? ?
87. What is the difference between preemptive scheduling and time slicing?
88. What is the catch or declare rule for method declarations?
89. Is Empty .java file a valid source file?
90. Can a .java file contain more than one java classes?
91. Is String a primitive data type in Java?
92. Is main a keyword in Java? 
93. Is next a keyword in Java?
94. Is delete a keyword in Java?
95. Is exit a keyword in Java?
96. What happens if you dont initialize an instance variable of any of the primitive
 types in Java?
97. What will be the initial value of an object reference which is defined as an instance variable?
98. What are the different scopes for Java variables?
99. What is the default value of the local variables?
100. Can a public class MyClass be defined in a source file named YourClass.java?
101. Can main method be declared final?
102. What will be the output of the following statement?
    System.out.println ("1" + 3);
103. What will be the default values of all the elements of an array defined as an instance variable?
104. What is the Collections API?
105. What is the List interface? 
106. What is the Vector class?
107. What is an Iterator interface? 
108. Which java.util classes and interfaces support event handling?
109. What is the GregorianCalendar class?
110. What is the Locale class?
111. What is the SimpleTimeZone class?
112. What is the Map interface?
113. What is the highest-level event class of the event-delegation model?
114. What is the Collection interface?
115. What is the Set interface?
116. What is the typical use of Hashtable?
117. I am trying to store an object using a key in a Hashtable. And some other  object already exists in that location, then what will happen? The existing object will be overwritten? Or the new object will be stored elsewhere?
118. What is the difference between the size and capacity of a Vector?
119. Can a vector contain heterogenous objects?
120. What is garbage collection? What is the process that is responsible for doing that in java? What kind of thread is the Garbage collector thread? - It is a daemon thread.
121. What is a daemon thread?.
122. How will you invoke any external process in Java?
123. What is the finalize method do?
124. What is mutable object and immutable object?
125. What is the basic difference between string and stringbuffer object?
126. What is the purpose of Void class?
127. What is reflection?
128. What is the base class for Error and Exception?
129. What is the byte range?
130. What is the implementation of destroy method in java.. is it native or java code?
131. What is a package?
132. What are the approaches that you will follow for making a program very efficient? 
133. What is a DatabaseMetaData?
134. What is Locale?
135. How will you load a specific locale?
136. What is JIT and its use?
137. Is JVM a compiler or an interpreter?
138. When you think about optimization, what is the best way to findout the time/memory consuming process?
139. What is the purpose of assert keyword used in JDK1.4.x?
140. How will you get the platform dependent values like line separator, path separator, etc., ?
141. What is skeleton and stub? what is the purpose of those?
142. What is the final keyword denotes?
143. What is the significance of ListIterator?
144. What is the major difference between LinkedList and ArrayList?
145. What is nested class?
146. What is inner class?
147. What is composition?
148. What is aggregation?
149. What are the methods in Object?
150. Can you instantiate the Math class?
151. What is singleton?

 

exam results,exam notifications   exam notifications,exams news
 
 
www.ekalasala.com www.ekalasala.com Demo Class www.ekalasala.com
 
>>More
 
www.ekalasala.com online training
 
 
 
Dial a Loan India
eamcet eamcet

Educational Institutions

Consultancies
 
 
 
eamcet

Misscellneous

 
 
 
 
Copyright © 2010 ekalasala India PvtLtd. All Rights Reserved