﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Sun River-随笔分类-Interview Preparation</title><link>http://www.blogjava.net/SunRiver/category/15628.html</link><description>Topics about Java SE, Servlet/JSP, JDBC, MultiThread, UML, Design Pattern, CSS, JavaScript, Maven, JBoss, Tomcat, ...</description><language>zh-cn</language><lastBuildDate>Mon, 25 Oct 2010 10:25:07 GMT</lastBuildDate><pubDate>Mon, 25 Oct 2010 10:25:07 GMT</pubDate><ttl>60</ttl><item><title>Java Faqs 2</title><link>http://www.blogjava.net/SunRiver/archive/2010/10/25/336111.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Mon, 25 Oct 2010 09:08:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2010/10/25/336111.html</guid><description><![CDATA[<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How do you delete a Cookie within a JSP? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(JSP)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer</p>
</strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">
<p align="left">Cookie mycook = new Cookie("name","value");</p>
<p align="left">response.addCookie(mycook);</p>
<p align="left">Cookie killmycook = new Cookie("mycook","value");</p>
<p align="left">killmycook.setMaxAge(0);</p>
<p align="left">killmycook.setPath("/");</p>
<p>killmycook.addCookie(killmycook);</p>
</font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How many types of protocol implementations does RMI have? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(RMI)</p>
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">RMI has at least three protocol implementations: Java</p>
<p align="left">Remote Method Protocol(JRMP), Internet Inter ORB Protocol(IIOP),</p>
<p align="left">and Jini Extensible Remote Invocation(JERI). These are alternatives,</p>
<p align="left">not part of the same thing, All three are indeed layer 6 protocols for</p>
<p>those who are still speaking OSI reference model.<br />
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold"></p>
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">What are the different identifier states of a Thread?</p>
<p></font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"></p>
<p align="left">(Core Java)</p>
<p></font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold"></p>
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">The different identifiers of a Thread are:</p>
<p align="left">R - Running or runnable thread</p>
<p align="left">S - Suspended thread</p>
<p align="left">CW - Thread waiting on a condition variable</p>
<p align="left">MW - Thread waiting on a monitor lock</p>
<p>MS - Thread suspended waiting on a monitor lock</p>
</font></font><br />
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">What is the fastest type of JDBC driver? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(JDBC)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">JDBC driver performance will depend on a number of</p>
<p align="left">issues:</p>
<p align="left">(a) the quality of the driver code,</p>
<p align="left">(b) the size of the driver code,</p>
<p align="left">(c) the database server and its load,</p>
<p align="left">(d) network topology,</p>
<p align="left">(e) the number of times your request is translated to a different API.</p>
<p align="left">In general, all things being equal, you can assume that the more your</p>
<p>request and response change hands, the slower it will be. This</p>
</font></font><font size="4" face="Arial"><font size="4" face="Arial">
<p align="left">means that Type 1 and Type 3 drivers will be slower than Type 2</p>
<p align="left">drivers (the database calls are make at least three translations versus</p>
<p align="left">two), and Type 4 drivers are the fastest (only one translation).</p>
</font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">Request parameter How to find whether a parameter</p>
<p align="left">exists in the request object? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(Servlets)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">1.boolean hasFoo = !(request.getParameter("foo") ==</p>
<p align="left">null || request.getParameter("foo").equals(""));</p>
<p align="left">2. boolean hasParameter =</p>
<p align="left">request.getParameterMap().contains(theParameter);</p>
<p>(which works in Servlet 2.3+)</p>
</font></font><br />
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How can I send user authentication information while</p>
<p align="left">makingURLConnection? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(Servlets)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">You&#8217;ll want to use</p>
<p align="left">HttpURLConnection.setRequestProperty and set all the appropriate</p>
<p>headers to HTTP authorization.</p>
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How do I convert a numeric IP address like 192.18.97.39</p>
<p align="left">into a hostname like java.sun.com? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(Networking)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer <strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold"></p>
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How many methods do u implement if implement the</p>
<p align="left">Serializable Interface? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(Core Java)</p>
<p align="left"></font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold"></p>
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">The Serializable interface is just a "marker" interface,</p>
<p align="left">with no methods of its own to implement. Other &#8217;marker&#8217; interfaces</p>
<p align="left">are</p>
<p align="left">java.rmi.Remote</p>
<p>java.util.EventListener</p>
<p align="left"></font></font></strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">String hostname =InetAddress.getByName("192.18.97.39").getHostName();</p>
</font></font></font></font></font></font></font></font></font>
<img src ="http://www.blogjava.net/SunRiver/aggbug/336111.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2010-10-25 17:08 <a href="http://www.blogjava.net/SunRiver/archive/2010/10/25/336111.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Java Faqs 1</title><link>http://www.blogjava.net/SunRiver/archive/2010/10/25/336099.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Mon, 25 Oct 2010 08:07:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2010/10/25/336099.html</guid><description><![CDATA[1. <strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">What is the query used to display all tables names in</p>
<p align="left">SQL Server (Query analyzer)? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(JDBC)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Courier"><font size="4" face="Courier">select * from information_schema.tables</p>
</font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p>Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">What is Externalizable? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(Core Java)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">Externalizable is an Interface that extends Serializable</p>
<p align="left">Interface. And sends data into Streams in Compressed Format. It has</p>
<p align="left">two methods, writeExternal(ObjectOuput out) and</p>
<p>readExternal(ObjectInput in).</p>
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">What modifiers are allowed for methods in an Interface?</p>
</font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">Only public and abstract modifiers are allowed for</p>
<p>methods in interfaces.</p>
</font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How many types of JDBC Drivers are present and what</p>
<p align="left">are they? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(JDBC)</p>
</font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">There are 4 types of JDBC Drivers</p>
<p align="left">Type 1: JDBC-ODBC Bridge Driver</p>
<p align="left">Type 2: Native API Partly Java Driver</p>
<p align="left">Type 3: Network protocol Driver</p>
<p align="left">Type 4: JDBC Net pure Java Driver</p>
</font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold"><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">What is the difference between ServletContext and</p>
<p align="left">PageContext? </font></font><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial"><font color="#810000" size="4" face="Arial">(JSP)</p>
<p></font></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">ServletContext: Gives the information about the container</p>
<p>PageContext: Gives the information about the Request.<br />
<strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold"></p>
<p align="left">Question </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">How to pass information from JSP to included JSP?</p>
<p></font></font><strong><font size="4" face="Arial,Bold"><font size="4" face="Arial,Bold">Answer </strong></font></font><font size="4" face="Arial"><font size="4" face="Arial">Using &lt;%jsp:param&gt; tag.</font></font></font></font></strong></font></font></font></font></p>
<img src ="http://www.blogjava.net/SunRiver/aggbug/336099.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2010-10-25 16:07 <a href="http://www.blogjava.net/SunRiver/archive/2010/10/25/336099.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>FAQs</title><link>http://www.blogjava.net/SunRiver/archive/2006/09/24/71614.html</link><dc:creator>Sun River</dc:creator><author>Sun River</author><pubDate>Sun, 24 Sep 2006 15:14:00 GMT</pubDate><guid>http://www.blogjava.net/SunRiver/archive/2006/09/24/71614.html</guid><description><![CDATA[
		<font color="#ff1493">From Manager</font>:<br />   1. Describe for us your current position. what are you major responsibility in this position?<br />   2. Describe to us what you understand this position to be/<br />   3. Why does this position interest you? What are your expectations?<br />   4. What past experience do you have that you feel qualified you for this position?<br /><font color="#0000ff">About Experience</font>:<br />   5. Tell us about you past experience with (probe for breadth &amp; depth of involvement in projects/complexity of workload --how was success measured? what kinds o results were achieved? )<br />   6. We have all had occasion when we were working on something and overlooked a small detail. Give me an example of when this happened to you. what causeed it to happen? what was the result?<br /><font color="#0000ff">Relationship Building:<br /></font>   7. Tell me about a time when you had to work with a business partner who you had not worked with before. how did you approach initiating and developing this relationship so that you could achieve your project or organization goals?<br />   8. This position requires the ability to juggle many tasks at once. how have you gone about meeting all of your deadlines on line/ what have you done when faced with missing a deadline(How do you organize your time)?<br /><font color="#0000ff">Closing<br />  </font><font color="#000000"> 9. What drives/moitivates you?<br />  10. What are your business goal?<br />  11. What do you see as your initial challenges if you were offered this position? what are your developmental gaps in relation to this position?<br />  12. Do you have any questions?<br /></font><img src ="http://www.blogjava.net/SunRiver/aggbug/71614.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/SunRiver/" target="_blank">Sun River</a> 2006-09-24 23:14 <a href="http://www.blogjava.net/SunRiver/archive/2006/09/24/71614.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>