Thursday, 8 March 2012

java Questions


1) What is the difference between String and StringBuffer...and what is that property called for String objects?
2) What will happen if u get an error in run() method of thread and if there is no try catch block for that?
3) What is Synchronization?
4) What is dead lock?
5) Write sample code using wait() and notify() methods?
6) If a thread has obtained an lock on an object..can other threads invoke non synchronized methods on the same object?
7) Explain the Exception heirarchy?
8) What is the diff b/w checked exceptions and unchecked exception and errors?
9) How to write our own exceptions? And can we write them without using super() in that?
10) What is encapsulation? Why do u need that?
11) What is event delegation in Swings?
12) Do you know about invokelater() in Swings...what is it for ?
13) What is a port?
14) Difference b/w client socket and server socket?
15) Is reading input from sockets a blocking call?
16) Difference b/w Readers and Streams in I/O?
17) How to open a file in read write mode..?
18) There is Date class in there any other package which has the Date class?
19) If we import java.util.Date and java.sql.Date and use Date d= new Date()..what happens?
20) What is the difference b/w vector and arraylist?
21) What is the alternate for HashTable...?
22) What is the difference b/w iterator and enumeration?
23) How can u sort a collection?
24) What is the difference b/w function and stored procedures?
25) Write the equilatent code for <jsp:useBean id="xyz" class="ABC" scope="application"> in servlet?
26) Different Layouts in Swings?
27) At what all places is "Scope" attibute used in JSP?
28) What are the different ways for loading a DataBase driver..(apart from using Class.forName())?
29) After connecting and fetching the data into result set and closing connection..without closing statement and result set
    can we now fetch values from resultset?
30) After fetching data into resultset and then removing the wire from system connecting to databse...can we print values from resultset now?
31) Different types of drivers...explain exactly their differences and when to go for what?
32) Explain the use of Timer class?
33) Significance of BufferedReaders over others?
34) Difference b/w TCP and UDP connection?
35) What is differnce b/w synchronous and asynchronous property in JMS and TCP/UDP?
36) What is different modes of communication in JMS and difference b/w them?
37) Explain SessionFacade pattern?
38) You have a entity bean Emp with 2 fields id and name with values 10 and srihari respectively ? Upon fetching using getId() and getName()m we get
    10, srihari.Now if any other application is updating the database and changed the name to srikanth and that data is commited. What value we get if
    we fetch using getName() - srihari or srikanth?
39) Can we dram class diagrams from use case diagrams?
40) Difference b/w sequence diagrams and collaboration diagrams?
41) How can we store data from a file (comma seperated values) in database table which contains the exact fields (as in the file)?
42) Have u used Taglibs? If yes where exactly u used this?
43) What are the different classes from UTIL package?
44) Different types of statements and their differences? What is the significance of Prepared statement?
45) Can we have a scrollable result set?
46) How can we get inter thread communication?
47) What is the advantage of implementing Runnable interface rather than extending Thread class?
48) Different methods of threads...that makes the running thread to stop running and go to some other state? And the difference b/w those methods?
49) How to get system properties like os name etc?
50) How do u launch an executable using java code?
51) Given an xml file
    ex: <?xml version="1.0" ?>
     i) Write code for fetching the values from the given xml and print them?
    ii) Can we represent the same xml file in a different form which should give the same information?

Difference between Ejb1.1 & 2.0
Brief intro on Struts
How many types of Diagrams are there in uml
Session beans
process flow of supply chain mgt
what is Local home & local remote
what is Jsp? And how how is it differ from servlets?
Static iclude and dynamic include in JSP
What is Dom & sax parsers
How do u call Ejb from jsp
Jsp life cycle
Moving from one jsp to another
Methods of life cycle in jsp
What is the difference btwn Sendredirect and forward
Necessary classes and interfaces in ejb
steps to be written in client code to update table in entity bean
How to create a jar file
Serialization & its methods
Regd use case diagrams
How rational diagrams are useful to a layman?
cmp vs bmp
Use of ejbql
Use of jms
Activation & passivation
life cycle of servlets
Jsp fwd and include
Date validation
Can we call a non static in a static method
Vector vs arraylist
Threads & its methods
Why to go for runnable interface
What is marshalling?
Why servlets filter is used
What is application server benchmarking
Class object vs instance
Use of polymorphism
Abstract class vs interface
Featurees of java
Ejbobject vs remoteobject
Session pooling and how it works
Transaction and their properties.
Transaction attributes and Isolation levels.
Difference between sendredirect and forward
Servletconfig and servletcontext.
What is anonymous class and its use
Volatile and transient.

No comments:

Post a Comment

Write your openion about my blog spot..To get automatic facebook updates like my Page ..It takes only 1 min to write the comment and to like the page.. Thanks.