<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Java Interviews and trick questions</title>
	<atom:link href="http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/</link>
	<description>Technology and certifications</description>
	<lastBuildDate>Thu, 02 Feb 2012 09:47:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Anjan Singh</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-1385</link>
		<dc:creator>Anjan Singh</dc:creator>
		<pubDate>Sun, 14 Nov 2010 10:16:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-1385</guid>
		<description>&lt;a href=&quot;#comment-221&quot; rel=&quot;nofollow&quot;&gt;@Sunil  &lt;/a&gt; 

The line
s.remove(i-1);//4
 
converts &quot;i-1&quot; to int. thus s.remove doestn removes anything frm the HashSet as it has Short not Integer.</description>
		<content:encoded><![CDATA[<p><a href="#comment-221" rel="nofollow">@Sunil  </a> </p>
<p>The line<br />
s.remove(i-1);//4</p>
<p>converts &#8220;i-1&#8243; to int. thus s.remove doestn removes anything frm the HashSet as it has Short not Integer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anil Kumar.C</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-1080</link>
		<dc:creator>Anil Kumar.C</dc:creator>
		<pubDate>Fri, 05 Feb 2010 04:34:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-1080</guid>
		<description>Nice trick. I request all of you to post this kind of interesting blogs.</description>
		<content:encoded><![CDATA[<p>Nice trick. I request all of you to post this kind of interesting blogs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CertPal</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-1019</link>
		<dc:creator>CertPal</dc:creator>
		<pubDate>Tue, 08 Dec 2009 10:25:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-1019</guid>
		<description>&lt;a href=&quot;#comment-1015&quot; rel=&quot;nofollow&quot;&gt;@Tony Cavanagh &lt;/a&gt; 
I agree with you except for the framework bit. In case the person being interviewed and the interviewer do not know any frameworks in common, the discussion would not go anywhere. There are way too many frameworks out there for java too.</description>
		<content:encoded><![CDATA[<p><a href="#comment-1015" rel="nofollow">@Tony Cavanagh </a><br />
I agree with you except for the framework bit. In case the person being interviewed and the interviewer do not know any frameworks in common, the discussion would not go anywhere. There are way too many frameworks out there for java too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Cavanagh</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-1015</link>
		<dc:creator>Tony Cavanagh</dc:creator>
		<pubDate>Fri, 04 Dec 2009 22:40:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-1015</guid>
		<description>Whats the point of trick questions, Java/J2EE has become very complex, WebServices, web frameworks, Middle Tier frameworks Spring Vs EJB vs, ORM vs JDBC vs Store procedures.

And so on. 

I think instead of trick questions and checking to see if developers know there API. Interviews should be on frameworks, why choose one against another. How you will design a application, what technology or frameworks will you use and why. 

How will you handle caching. Persistence. Threading issues, design patterns you have used and why.

Also a good discussion on Java 5 what it brings to development what problems has it solved.</description>
		<content:encoded><![CDATA[<p>Whats the point of trick questions, Java/J2EE has become very complex, WebServices, web frameworks, Middle Tier frameworks Spring Vs EJB vs, ORM vs JDBC vs Store procedures.</p>
<p>And so on. </p>
<p>I think instead of trick questions and checking to see if developers know there API. Interviews should be on frameworks, why choose one against another. How you will design a application, what technology or frameworks will you use and why. </p>
<p>How will you handle caching. Persistence. Threading issues, design patterns you have used and why.</p>
<p>Also a good discussion on Java 5 what it brings to development what problems has it solved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BostonJava</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-230</link>
		<dc:creator>BostonJava</dc:creator>
		<pubDate>Fri, 02 Oct 2009 12:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-230</guid>
		<description>Oops (typo) .... s.remove((short)(i+0))</description>
		<content:encoded><![CDATA[<p>Oops (typo) &#8230;. s.remove((short)(i+0))</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BostonJava</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-229</link>
		<dc:creator>BostonJava</dc:creator>
		<pubDate>Fri, 02 Oct 2009 12:17:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-229</guid>
		<description>Not for nothing, but on iteration 1, the code will add a zero but try to remove -1 which will fail, regardless of the key&#039;s object type. If you change the remove line to be s.remove(i-0), it will be not be removed (due to casting). Of course s.remove((short)(i+)) will remove.

Yeah, I&#039;ve been on those dreaded Java interviews too. Not much fun. Especially when the person asking a huge list of questions doesn&#039;t want to do it and doesn&#039;t really want you there. Sigh.

Rob</description>
		<content:encoded><![CDATA[<p>Not for nothing, but on iteration 1, the code will add a zero but try to remove -1 which will fail, regardless of the key&#8217;s object type. If you change the remove line to be s.remove(i-0), it will be not be removed (due to casting). Of course s.remove((short)(i+)) will remove.</p>
<p>Yeah, I&#8217;ve been on those dreaded Java interviews too. Not much fun. Especially when the person asking a huge list of questions doesn&#8217;t want to do it and doesn&#8217;t really want you there. Sigh.</p>
<p>Rob</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CertPal</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-226</link>
		<dc:creator>CertPal</dc:creator>
		<pubDate>Fri, 02 Oct 2009 06:49:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-226</guid>
		<description>&lt;a href=&quot;#comment-224&quot; rel=&quot;nofollow&quot;&gt;@Steve &lt;/a&gt; 
I was not aware that Josh demonstrated this as a gotcha.

&lt;a href=&quot;#comment-222&quot; rel=&quot;nofollow&quot;&gt;@Sunil &lt;/a&gt; 
No problemo.</description>
		<content:encoded><![CDATA[<p><a href="#comment-224" rel="nofollow">@Steve </a><br />
I was not aware that Josh demonstrated this as a gotcha.</p>
<p><a href="#comment-222" rel="nofollow">@Sunil </a><br />
No problemo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-225</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 02 Oct 2009 05:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-225</guid>
		<description>I take back what I said about internals only, but I would probably accept the answer &quot;why are you using a Short as a hash key&quot;  It is worthwhile to understand the problem but I would wager this is far less common than say a case like this: double x = (1 / 2) * 2.</description>
		<content:encoded><![CDATA[<p>I take back what I said about internals only, but I would probably accept the answer &#8220;why are you using a Short as a hash key&#8221;  It is worthwhile to understand the problem but I would wager this is far less common than say a case like this: double x = (1 / 2) * 2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-224</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Fri, 02 Oct 2009 05:31:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-224</guid>
		<description>I think this example was demonstrated by Josh Bloch at a Google Talk.  I am pretty sure that unless the job is working on Java internals, expecting an explanation is probably asking too much.</description>
		<content:encoded><![CDATA[<p>I think this example was demonstrated by Josh Bloch at a Google Talk.  I am pretty sure that unless the job is working on Java internals, expecting an explanation is probably asking too much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alldevnet.com</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-223</link>
		<dc:creator>alldevnet.com</dc:creator>
		<pubDate>Thu, 01 Oct 2009 18:27:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-223</guid>
		<description>&lt;strong&gt;Java Interviews and trick questions - CertPal...&lt;/strong&gt;

Java Interviews and trick questions...</description>
		<content:encoded><![CDATA[<p><strong>Java Interviews and trick questions &#8211; CertPal&#8230;</strong></p>
<p>Java Interviews and trick questions&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-222</link>
		<dc:creator>Sunil</dc:creator>
		<pubDate>Thu, 01 Oct 2009 16:50:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-222</guid>
		<description>&lt;a href=&quot;#comment-221&quot; rel=&quot;nofollow&quot;&gt;@Sunil &lt;/a&gt; 
Sorry I did not see your line where you gave the answer</description>
		<content:encoded><![CDATA[<p><a href="#comment-221" rel="nofollow">@Sunil </a><br />
Sorry I did not see your line where you gave the answer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sunil</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-221</link>
		<dc:creator>Sunil</dc:creator>
		<pubDate>Thu, 01 Oct 2009 16:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-221</guid>
		<description>Are you trying to ask a trick question here or giving a trick answer because the code outputs a 100 and does not fail</description>
		<content:encoded><![CDATA[<p>Are you trying to ask a trick question here or giving a trick answer because the code outputs a 100 and does not fail</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CertPal</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-218</link>
		<dc:creator>CertPal</dc:creator>
		<pubDate>Thu, 01 Oct 2009 04:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-218</guid>
		<description>&lt;blockquote cite=&quot;#commentbody-216&quot;&gt;
&lt;strong&gt;&lt;a href=&quot;#comment-216&quot; rel=&quot;nofollow&quot;&gt;Developer Dude&lt;/a&gt; :&lt;/strong&gt;
&lt;p&gt;They interviewers don’t know what question to ask (how the hell do I know where I see myself in 5 years? If I knew that I would be there already, and no I am not going to tell you my worst trait or weakest skill/etc. – you don’t really want to know, trust me and do you really expect me to tell you anyway – or to give you some pre-canned platitude?)&lt;/p&gt;
&lt;p&gt;No, rather than test me with stupid problems – get to know me.&lt;/p&gt;
&lt;/blockquote&gt;
Amen to that :)</description>
		<content:encoded><![CDATA[<blockquote cite="#commentbody-216"><p>
<strong><a href="#comment-216" rel="nofollow">Developer Dude</a> :</strong></p>
<p>They interviewers don’t know what question to ask (how the hell do I know where I see myself in 5 years? If I knew that I would be there already, and no I am not going to tell you my worst trait or weakest skill/etc. – you don’t really want to know, trust me and do you really expect me to tell you anyway – or to give you some pre-canned platitude?)</p>
<p>No, rather than test me with stupid problems – get to know me.</p>
</blockquote>
<p>Amen to that <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Developer Dude</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-216</link>
		<dc:creator>Developer Dude</dc:creator>
		<pubDate>Wed, 30 Sep 2009 20:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-216</guid>
		<description>I don&#039;t have a good enough memory to remember the signature for every method in every Java API to know whether it is taking an object or an index. My first desire would be to look at the Javadocs to truly understand what is going on in someone else&#039;s code. When asked questions about APIs (common or not) that should be the answer.

Second, I prefer to know how someone solves a problem, not whether they understand every nuance of a language, or every class in an API even if it is just the Collections API (maybe in their domain they do not use HashSet very much). While the latter helps and experience is of value, the former (problem solving) is more important. Question about what pattern they would use (regardless of language), what the advantages/disadvantages are, what kind of interfaces they write, and so on, are often more useful than questions constructed by language lawyers any day. Other questions about dev processes (such as iterative methodologies, etc.) are also more valuable to get an idea of their philosophy and how it matches how your team works.

Of course, if you are interviewing interns or someone right out of college, these kinds or question *might* give you a gauge of their understanding of the language, but you probably can assume that already.

Also, of the many interviews I have been in over the decades for dev positions, only two have ever asked me how I would test a given solution (and those two were in the last year, which says something to me about the importance placed on TDD or even just testing period, despite all the lip service given to being committed to testing/quality.

Most interviews and interviewers for dev positions (and I assume other positions) just plain suck. They interviewers don&#039;t know what question to ask (how the hell do I know where I see myself in 5 years? If I knew that I would be there already, and no I am not going to tell you my worst trait or weakest skill/etc. - you don&#039;t really want to know, trust me and do you really expect me to tell you anyway - or to give you some pre-canned platitude?)

No, rather than test me with stupid problems - get to know me.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t have a good enough memory to remember the signature for every method in every Java API to know whether it is taking an object or an index. My first desire would be to look at the Javadocs to truly understand what is going on in someone else&#8217;s code. When asked questions about APIs (common or not) that should be the answer.</p>
<p>Second, I prefer to know how someone solves a problem, not whether they understand every nuance of a language, or every class in an API even if it is just the Collections API (maybe in their domain they do not use HashSet very much). While the latter helps and experience is of value, the former (problem solving) is more important. Question about what pattern they would use (regardless of language), what the advantages/disadvantages are, what kind of interfaces they write, and so on, are often more useful than questions constructed by language lawyers any day. Other questions about dev processes (such as iterative methodologies, etc.) are also more valuable to get an idea of their philosophy and how it matches how your team works.</p>
<p>Of course, if you are interviewing interns or someone right out of college, these kinds or question *might* give you a gauge of their understanding of the language, but you probably can assume that already.</p>
<p>Also, of the many interviews I have been in over the decades for dev positions, only two have ever asked me how I would test a given solution (and those two were in the last year, which says something to me about the importance placed on TDD or even just testing period, despite all the lip service given to being committed to testing/quality.</p>
<p>Most interviews and interviewers for dev positions (and I assume other positions) just plain suck. They interviewers don&#8217;t know what question to ask (how the hell do I know where I see myself in 5 years? If I knew that I would be there already, and no I am not going to tell you my worst trait or weakest skill/etc. &#8211; you don&#8217;t really want to know, trust me and do you really expect me to tell you anyway &#8211; or to give you some pre-canned platitude?)</p>
<p>No, rather than test me with stupid problems &#8211; get to know me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CertPal</title>
		<link>http://www.certpal.com/blogs/2009/09/java-interviews-and-trick-questions/comment-page-1/#comment-215</link>
		<dc:creator>CertPal</dc:creator>
		<pubDate>Wed, 30 Sep 2009 17:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.certpal.com/blogs/?p=331#comment-215</guid>
		<description>&lt;a href=&quot;#comment-201&quot; rel=&quot;nofollow&quot;&gt;@Ashitkin Alexander &lt;/a&gt; 
I doubt the interviewer will let you counter question  :mrgreen: 
&lt;a href=&quot;#comment-206&quot; rel=&quot;nofollow&quot;&gt;@Alex Miller &lt;/a&gt; 
I agree that the answer itself might not matter. Most trick questions usually have one tough answer which 99% will not get and there is no guarantee that the 1% that were filtered out are good programmers.</description>
		<content:encoded><![CDATA[<p><a href="#comment-201" rel="nofollow">@Ashitkin Alexander </a><br />
I doubt the interviewer will let you counter question  <img src='http://www.certpal.com/blogs/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /><br />
<a href="#comment-206" rel="nofollow">@Alex Miller </a><br />
I agree that the answer itself might not matter. Most trick questions usually have one tough answer which 99% will not get and there is no guarantee that the 1% that were filtered out are good programmers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

