Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Java Important interview questions

Tue Oct 21, 2008 5:04 pm

1)In a class i have 10 variables... out of them i want to serialize

only 3 variables..how to do it?


you have to implement serializable interface and you have to declare variables
as transient which are not supposed to serialize.

2)In a class i have 2 methods.Each is associated with 2 threads (t1

for method1,t2 for method2).Both the methods r synchronized. .Now if i

call both the methods...will they execute simultaneously or not?


please explain?


it may lead to deadlock.

3)What is permanent generation ofJVM?



4)What is ORM file?

Object Relation Mapping in heard that it is used in Spring Frame work.

5)What is the default value in <load-on-startup> tag...what is the

difference among 0,1,2,3 etc...?




6)How people r saying that vector is a legacy class..what' s the logic

behind?


Vector is legacy class means it was built before the collection framework cames
without any synchronization. The Vector and Hashtable both are legacy class.
Which are implemented before Collection Framework is implemented.


7)How to synchronize a class?




8)Is an Action class itself is Servlet or not?





9)What is difference b/w Class Variables and Instance

Variables..and. .how can i find whether a variable is a CV r IV just by

looking at them in a class?


Class variables are declared as static with static keyword.
others are instance variables if they are not declared in method.


10)Which method will be called first in a Form-bean class?




Post a reply
  Related Posts  to : Java Important interview questions
 java interview questions     -  
 Important JSP tags     -  
 Usage of the CSS property !important     -  
 Important : Read before you post .     -  
 Get the important variables of random forest classifier     -  
 web hosting sites free check out important useful     -  
 return false; questions     -  
 Questions: Perl Script. PHP.     -  
 Real questions for BlackBerry BCP-211 exam     -  
 broken latest 1D0-435 test questions     -