Professional Documents
Culture Documents
com
lut
io n
s
er
So
re
Ca
16. Is it possible to have more than one public class in same file?
17. What is file system and different types of file system?
18. What are environment variables?
is
as
Class one {
Class two {
}
ph
Class three {
}
Em
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
29. What is global variable? Does java supports global variable give reason?
30. Define following terms: object, class, inheritance, interface, package
31.what is constructor and write syntax?
33.how do you create objects in java?
So
er
re
Ca
is
as
ph
Em
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
64. From below whom all take default valuelocal var, instance variable, parameter
variable, and static variable?
So
er
re
Ca
74.Define package and why is it recommended to write class inside the package?
75. Different type of polymorphism?
is
as
ph
Em
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
90. What is the difference between light weight process and heavy weight process?
91. What are threads?
92. Difference between thread and process?
93. Multitasking vs. multithreading.
94. What is a daemon thread?
95. What is a zombie thread?
96. Which thread keeps on running in a java program until the program is over?
97. In which class wait() method is defined?
So
100. What are the different ways of creating threads? Which one is better?
101. Name some methods in thread class?
er
re
Ca
is
as
ph
116. What happens if the object to be serialized includes the references to other
serializable objects?
Em
117. What happens if an object is serializable but it includes a reference to a nonserializable object?
118. Are the static variables saved as the part of serialization?
Emphasis Career Solutions, Bangalore
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
121. Does the order in which the value of the transient variables and the state of the
object using the defaultWriteObject() method are saved during serialization matter?
122. How can one customize the Serialization process? or What is the purpose of
implementing the writeObject() and readObject() method?
123. If a class is serializable but its superclass in not , what will be the state of the
instance variables inherited from super class after deserialization?
True /False?
So
125. Which part of the memory is involved in Garbage Collection? Stack or Heap?
er
re
129. What are the different ways to make an object eligible for Garbage Collection
130. Can the Garbage Collection be forced by any means?
Ca
is
of execution and is not garbage collected. Later at some point the same object
becomes eligible for Garbage collection, will the finalize() method be called again?
as
134. How many times does the garbage collector calls the finalize() method for an
object?
135. What happens if an uncaught exception is thrown from during the execution of
the finalize() method of an object?
ph
Em
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
Collections Questions:
1. What is the main difference between an ArrayList and a Vector? What is the main
difference between Hashmap and Hashtable?
2. Explain the Java Collection framework?
So
When providing a user defined key class for storing objects in the Hashmaps or
er
re
10 Where will you use Hashtable and where will you use HashMap?
11 Difference between Vector and ArrayList?
Ca
is
as
18 What is the importance of hashCode() and equals() methods? How they are used
in Java?
ph
Em
Collection?
22 Which implementation of the List interface provides for the fastest insertion of a
new element into the middle of the list?
Emphasis Career Solutions, Bangalore
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
29 What is the main difference between shallow cloning and deep cloning of objects?
So
32 If an Employee class is present and its objects are added in an arrayList. Now I
want the list to be sorted on the basis of the employeeID of Employee class. What are
er
the steps?
34 Consider a scenario. If an ArrayList has to be iterate to read data only, what are
re
Ca
36 What is WeakHashMap?
37 What is identityHashMap?
38 What is ConcurrentHashMap?
Em
ph
as
is
www.emphasiscareer.com
www.emphasiscareer.com
J2ee Questions
lut
io n
s
So
er
re
Ca
is
as
ph
Em
"jsp:usebean"?
28. What are the differences between static and a dynamic include?
29. Is JSP variable declaration thread safe?
www.emphasiscareer.com
www.emphasiscareer.com
lut
io n
s
30. Explain JSP URL mapping? What is URL hiding or protecting the JSP page?
31. What are custom tags? Explain how to build custom tags?
32. What is the difference between custom JSP tags and JavaBeans?
31. What is a Expression?
32. Difference between forward and sendRedirect?
33. What are implicit objects? List them?
34. How do I prevent the output of my JSP or Servlet pages from being cached by
the browser?
So
35. How to implement a thread-safe JSP page? What are the advantages and
Disadvantages of using it?
36. Why to use the HttpServlet Init method to perform expensive operations that
need only be done once?
er
Em
ph
as
is
Ca
re
www.emphasiscareer.com