<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>SARAVANAN SIVAJI</title>
	<atom:link href="http://saravananmtech.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://saravananmtech.wordpress.com</link>
	<description>Dedicated to JAVA Technologies</description>
	<lastBuildDate>Sun, 25 Sep 2011 11:00:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='saravananmtech.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>SARAVANAN SIVAJI</title>
		<link>http://saravananmtech.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://saravananmtech.wordpress.com/osd.xml" title="SARAVANAN SIVAJI" />
	<atom:link rel='hub' href='http://saravananmtech.wordpress.com/?pushpress=hub'/>
		<item>
		<title>JSP life cycle steps</title>
		<link>http://saravananmtech.wordpress.com/2010/10/21/jsp-life-cycle-steps/</link>
		<comments>http://saravananmtech.wordpress.com/2010/10/21/jsp-life-cycle-steps/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 09:57:08 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=260</guid>
		<description><![CDATA[JSP life cylce steps 1.  Translate the JSP into a Servlet 2.  Compile Servlet source code 3.  Instantiate the servlet class 4.  Call jspInit() 5.  Call _jspService() 6.  Call jspDestroy() Point to be noted: You can override jspInit() and jspDestroy(). Note the underscoe at the front of the _jspService() method, it means, you must NOT [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=260&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>JSP life cylce steps</p>
<p>1.  Translate the JSP into a Servlet</p>
<p>2.  Compile Servlet source code</p>
<p>3.  Instantiate the servlet class</p>
<p>4.  Call jspInit()</p>
<p>5.  Call _jspService()</p>
<p>6.  Call jspDestroy()</p>
<p>Point to be noted:</p>
<p>You can override jspInit() and jspDestroy().</p>
<p>Note the underscoe at the front of the _jspService() method, it means, you must NOT try to override it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/260/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=260&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/10/21/jsp-life-cycle-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>
	</item>
		<item>
		<title>JAVA J2EE interview questions</title>
		<link>http://saravananmtech.wordpress.com/2010/10/20/java-j2ee-interview-questions-2/</link>
		<comments>http://saravananmtech.wordpress.com/2010/10/20/java-j2ee-interview-questions-2/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 18:28:36 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=257</guid>
		<description><![CDATA[&#160; My JAVA/J2EE Interview Experience &#160; 1.      Architecture of my last project.  Few questions based on that. &#160; 2.      List&#60;Object&#62; obj = new ArrayList&#60;String&#62;(); Will the above compile? Why polymorphism works for List and ArrayList, why not for generic types &#60;Object&#62; and &#60;String&#62; in the above line? &#160; 3.      What are the access specifiers? &#160; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=257&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>My JAVA/J2EE Interview Experience</p>
<p>&nbsp;</p>
<p>1.      Architecture of my last project.  Few questions based on that.</p>
<p>&nbsp;</p>
<p>2.      List&lt;Object&gt; obj = new ArrayList&lt;String&gt;();</p>
<p>Will the above compile?</p>
<p>Why polymorphism works for List and ArrayList, why not for generic types &lt;Object&gt; and &lt;String&gt; in the above line?</p>
<p>&nbsp;</p>
<p>3.      What are the access specifiers?</p>
<p>&nbsp;</p>
<p>4.      What is the difference between default and protected access specifiers?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>5.      Can I access protected variable in the following code?</p>
<p>Package pack1;</p>
<p>&nbsp;</p>
<p>Class A</p>
<p>{</p>
<p>Protected int variable = 10;</p>
<p>}</p>
<p>&nbsp;</p>
<p>Package pack2;</p>
<p>Import pack1.*;</p>
<p>&nbsp;</p>
<p>Class B extends A</p>
<p>{</p>
<p>&nbsp;</p>
<p>Public void display()</p>
<p>{</p>
<p>A obj = new A();</p>
<p>System.out.println( obj.variable );  //Will this give output????</p>
<p>}</p>
<p>}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>6.      Write an interface. Write an abstract class? Write a class which extends and implements the above two? Will the code compile. If yes, whether the display method implementation is applicable to interface sample1 or abstract class sample2.  If no, why it won’t compile?</p>
<p>&nbsp;</p>
<p>interface sample1</p>
<p>{</p>
<p>void display();</p>
<p>}</p>
<p>&nbsp;</p>
<p>absctract class sample2</p>
<p>{</p>
<p>abstract void display();</p>
<p>}</p>
<p>class A extends sample2 implements sample1</p>
<p>{</p>
<p>public void display()</p>
<p>{</p>
<p>System.out.println( “display method implementation” );</p>
<p>}</p>
<p>}</p>
<p>&nbsp;</p>
<p>7.      Method Overriding rules? Do I need to take care anything about access specifiers while method overriding?</p>
<p>&nbsp;</p>
<p>8.      From the following code,</p>
<p>&nbsp;</p>
<p>import java.io.*;</p>
<p>Class A</p>
<p>{</p>
<p>protected void display() throws IOException</p>
<p>{}</p>
<p>}</p>
<p>&nbsp;</p>
<p>Class B</p>
<p>{</p>
<p>public void display() throws Exception</p>
<p>{}</p>
<p>&nbsp;</p>
<p>}</p>
<p>&nbsp;</p>
<p>Will the above code compile? Justify?</p>
<p>9.      I have an Employee object with attributes like employee ID, employee name.  I have stored these employee objects in an ArrayList.  I want to display the arraylist of employees sorted by employee ID as well as employee name. How you will do that? (NOTE:  They asked me to write complete code.  They mainly focused on the logic)</p>
<p>&nbsp;</p>
<p>10.  I have a class.  I want to execute the class without any method()?  Is it possible?</p>
<p>&nbsp;</p>
<p>11.  From the following code,</p>
<p>&nbsp;</p>
<p>Public void display()</p>
<p>{</p>
<p>&#8212;&#8212;- int variable;</p>
<p>}</p>
<p>&nbsp;</p>
<p>What are the access level specifiers can be declared with the above variables? (NOTE:  Explained the local variables rules)</p>
<p>&nbsp;</p>
<p>12.  Can I serialize static variable?</p>
<p>&nbsp;</p>
<p>13.  From the following code in Servlet</p>
<p>Map mymap = new HashMap();</p>
<p>Mymap.put( “1”, “a” );</p>
<p>Mymap.put( “2”, “b” );</p>
<p>Mymap.put( “3”, “c” );</p>
<p>Mymap.put( “4”, “d” );</p>
<p>Mymap.put( “5”, “e” );</p>
<p>Request.setAttribute( “mycollection”, mymap );</p>
<p>&nbsp;</p>
<p>Write the JSP code to retrieve the elements and load it in a combo box.</p>
<p>&nbsp;</p>
<p>14.  What is ServletContext and ServletConfig?</p>
<p>&nbsp;</p>
<p>15.  How you declare servlet in deployment descriptior? (NOTE: I wrote the complete list of tags)</p>
<p>&nbsp;</p>
<p>16.  What is load on startup? How you declare in deployment descriptor? What kind of value we need to mention there?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>17.  From the following code,</p>
<p>&nbsp;</p>
<p>Class A</p>
<p>{</p>
<p>int a = 10;</p>
<p>&nbsp;</p>
<p>void display()</p>
<p>{</p>
<p>System.out.println( “class a” );</p>
<p>}</p>
<p>}</p>
<p>&nbsp;</p>
<p>Class B extends A</p>
<p>{</p>
<p>Int a = 100;</p>
<p>&nbsp;</p>
<p>Void display()</p>
<p>{</p>
<p>System.out.println( “class b” );</p>
<p>}</p>
<p>&nbsp;</p>
<p>Public static void main( String [] args )</p>
<p>{</p>
<p>A aobj = new B();</p>
<p>Aobj.display();                                   //What is the output????? Why???</p>
<p>System.out.println( Aobj.a );           //What is the output????? Why???</p>
<p>}</p>
<p>}</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>18.  How you will the forward the request from Servlet to other web component?</p>
<p>&nbsp;</p>
<p>19.  What is the difference between forward() and include() methods of ServletRequestDispatcher?</p>
<p>&nbsp;</p>
<p>20.  From how many ways we can get the reference to ServletRequestDispatcher?</p>
<p>&nbsp;</p>
<p>21.  What is the difference between getSession(false) and getSession() and getSession(true)?</p>
<p>&nbsp;</p>
<p>22.  What are the implicit objects in JSP?</p>
<p>&nbsp;</p>
<p>23.  How you will handle exception handling in JSP?</p>
<p>&nbsp;</p>
<p>24.  Write the JAVA code to retrieve data from database?  (NOTE:  I wrote the complete JDBC code.  They are mainly focusing on how you are catching the exception)</p>
<p>&nbsp;</p>
<p>25.  Write the code showing an example try, catch and finally?</p>
<p>&nbsp;</p>
<p>26.  How you implemented the AJAX? What object we use?</p>
<p>&nbsp;</p>
<p>27.  Write an SQL query to display the top 2 salary from the following table,</p>
<p>&nbsp;</p>
<p>Table: employee</p>
<p>EmpID                        EmpName     Salary                         DepartmentID</p>
<p>1                      A                     1000                2</p>
<p>2                      B                      3000                1</p>
<p>3                      C                     2500                2</p>
<p>4                      D                     5000                3</p>
<p>5                      E                      3000                3</p>
<p>&nbsp;</p>
<p>Table: department</p>
<p>&nbsp;</p>
<p>deptID                       deptName</p>
<p>1                      production</p>
<p>2                      development</p>
<p>3                      testing</p>
<p>4                      management</p>
<p>&nbsp;</p>
<p>28.  Write an SQL query to display the department ID of the employee having salary greater than 2500?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>29.  Second Round – Asked questions from all the projects mentioned in the resume?  Questions like how you implemented? How it works?</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=257&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/10/20/java-j2ee-interview-questions-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>
	</item>
		<item>
		<title>Java 5.0 Features Part 2 &#8211; static imports</title>
		<link>http://saravananmtech.wordpress.com/2010/10/09/java-5-0-features-part-2-static-imports/</link>
		<comments>http://saravananmtech.wordpress.com/2010/10/09/java-5-0-features-part-2-static-imports/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 04:08:10 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=254</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=254&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://saravananmtech.files.wordpress.com/2010/10/static-imports.jpg"><img class="aligncenter size-full wp-image-255" title="static imports" src="http://saravananmtech.files.wordpress.com/2010/10/static-imports.jpg" alt="" width="658" height="440" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/254/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/254/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/254/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=254&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/10/09/java-5-0-features-part-2-static-imports/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/10/static-imports.jpg" medium="image">
			<media:title type="html">static imports</media:title>
		</media:content>
	</item>
		<item>
		<title>Java 5.0 Feature Part 1: Autoboxing and Unboxing</title>
		<link>http://saravananmtech.wordpress.com/2010/10/09/java-5-0-feature-part-1-autoboxing-and-unboxing/</link>
		<comments>http://saravananmtech.wordpress.com/2010/10/09/java-5-0-feature-part-1-autoboxing-and-unboxing/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 03:57:59 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=248</guid>
		<description><![CDATA[The autoboxing feature added to Java 5.0 does the conversion from primitive to wrapper object automatically.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=248&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The autoboxing feature added to Java 5.0 does the conversion from primitive to wrapper object automatically.</p>
<p><a href="http://saravananmtech.files.wordpress.com/2010/10/wrap-and-unwrap.jpg"><img class="aligncenter size-full wp-image-249" title="wrap and unwrap" src="http://saravananmtech.files.wordpress.com/2010/10/wrap-and-unwrap.jpg" alt="" width="333" height="237" /></a></p>
<p><a href="http://saravananmtech.files.wordpress.com/2010/10/autobox-and-unbox.jpg"><img class="aligncenter size-full wp-image-250" title="autobox and unbox" src="http://saravananmtech.files.wordpress.com/2010/10/autobox-and-unbox.jpg" alt="" width="607" height="369" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/248/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/248/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/248/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=248&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/10/09/java-5-0-feature-part-1-autoboxing-and-unboxing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/10/wrap-and-unwrap.jpg" medium="image">
			<media:title type="html">wrap and unwrap</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/10/autobox-and-unbox.jpg" medium="image">
			<media:title type="html">autobox and unbox</media:title>
		</media:content>
	</item>
		<item>
		<title>Static and Final in Java</title>
		<link>http://saravananmtech.wordpress.com/2010/10/09/static-and-final-in-java/</link>
		<comments>http://saravananmtech.wordpress.com/2010/10/09/static-and-final-in-java/#comments</comments>
		<pubDate>Sat, 09 Oct 2010 03:25:10 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=245</guid>
		<description><![CDATA[  Static in Java A static method should be called using the class name rather than object reference variables. A static method can be invoked without any instances of the method’s class on the heap. A static method is good for a utility method that does not depend on a particular instance variable value. A [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=245&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> </p>
<p>Static in Java</p>
<ul>
<li>A static method should be called using the class name rather than object reference variables.</li>
<li>A static method can be invoked without any instances of the method’s class on the heap.</li>
<li>A static method is good for a utility method that does not depend on a particular instance variable value.</li>
<li>A static method is not associated with a particular instance – only the class = so it cannot access any instance variable values of its class.  It wouldn’t know which instance’s values to use.</li>
<li>A static method cannot access a non-static method, since non-static methods are usually associated with instance variable state.</li>
<li>If you have a class with only static methods and you do not want the class to be instantiated you can mark the constructor private.</li>
<li>A static variable is a variable shared by all members of a given class.  There is only one copy of a static variable in a class, rather than one copy per each individual instance for instance variables.</li>
<li>A static method can access a static variable</li>
<li>To make a constant in java, mark a variable as both static and final</li>
<li>A final static variable must be assigned a value either at the time it is declared, or in a static initializer</li>
</ul>
<p> <a href="http://saravananmtech.files.wordpress.com/2010/10/staticbloc.jpg"><img class="aligncenter size-full wp-image-246" title="staticbloc" src="http://saravananmtech.files.wordpress.com/2010/10/staticbloc.jpg" alt="" width="224" height="78" /></a></p>
<ul>
<li>The naming convention for constants is to make the name all uppercase.</li>
<li>A final variable value cannot be changed once it has been assigned.</li>
<li>Assigning a value to a final instance variable must be either at the time it is declared, or in the constructor.</li>
<li>A final method cannot be overridden.</li>
<li>A final class cannot be extended (subclassed)</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/245/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=245&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/10/09/static-and-final-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/10/staticbloc.jpg" medium="image">
			<media:title type="html">staticbloc</media:title>
		</media:content>
	</item>
		<item>
		<title>When to make a class, a subclass, an abstract class, or an interface?</title>
		<link>http://saravananmtech.wordpress.com/2010/10/06/when-to-make-a-class-a-subclass-an-abstract-class-or-an-interface/</link>
		<comments>http://saravananmtech.wordpress.com/2010/10/06/when-to-make-a-class-a-subclass-an-abstract-class-or-an-interface/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 15:47:05 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=242</guid>
		<description><![CDATA[Make a class that does not extend anything (other than Object) when your new class does not pass the IS-A test for any other type. Make a subclass only when you need to make a more specific version of a class and need to override or add new behaviors. Use an abstract class when you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=242&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Make a <strong>class </strong>that does not extend anything (other than Object) when your new class does not pass the IS-A test for any other type.</p>
<p>Make a <strong>subclass </strong>only when you need to make a more specific version of a class and need to override or add new behaviors.</p>
<p>Use an <strong>abstract class </strong>when you want to define a template for a group of subclasses, and you have at least some implementation code that all subclasses could use.  Make the class abstract when you want to guarantee that nobody can make objects of that type.</p>
<p>Use an <strong>interface </strong>when you want to define a role that other classes can play, regardless of where those classes are in the inheritance tree.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/242/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/242/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/242/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=242&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/10/06/when-to-make-a-class-a-subclass-an-abstract-class-or-an-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>
	</item>
		<item>
		<title>Java J2EE Interview Questions</title>
		<link>http://saravananmtech.wordpress.com/2010/09/27/java-j2ee-interview-questions/</link>
		<comments>http://saravananmtech.wordpress.com/2010/09/27/java-j2ee-interview-questions/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 18:36:10 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=240</guid>
		<description><![CDATA[Recently I have attend the interview in one of the reputed MNC company for JAVA/J2EE technologies.  I tried my level best to recollect all interview questions that I have faced are listed here: JAVA/J2EE Interview questions What are the features newly introduced in JAVA SE 5.0 What is the necessity of Generic Programming? Syntax of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=240&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I have attend the interview in one of the reputed MNC company for JAVA/J2EE technologies.  I tried my level best to recollect all interview questions that I have faced are listed here:</p>
<p>JAVA/J2EE Interview questions</p>
<ol>
<li>What      are the features newly introduced in JAVA SE 5.0</li>
<li>What      is the necessity of Generic Programming?</li>
<li>Syntax      of Generic Class and Methods declaration</li>
<li>Give      collection hierarchy</li>
<li>Which      collections are sorted.</li>
<li>Difference      between Arraylist and Vector</li>
<li>Difference      between Collection and Collections</li>
<li>If I      want to sort ArrayList, what we need to do.</li>
<li>Difference      between Comparable and Comparator.</li>
<li>What      compareTo() method will return and explain each returned data.</li>
<li>Difference      between checked and unchecked exception</li>
<li>Hierarchy      of Exceptions</li>
<li>Do we      need to catch Error? Difference between Error and Exception</li>
<li>List      some checked and unchecked exception</li>
<li>Do we      need to make sure anything when we write try-catch blocks</li>
<li>Will      the statements after catch block run when after an exception was raised in      try block.</li>
<li>When      finally block executes</li>
<li>What      is the use of throws keyword</li>
<li>What      are the methods to create thread?       Which is best method?</li>
<li>Does      the Thread class implements Runnable interface.</li>
<li>When      we implement Runnable interface, which method do we need to implement.</li>
<li>How      you will start the thread for execution.</li>
<li>What      will happen when you call start () method.       Can I start thread without start () method?</li>
<li>What      will happen when we explicitly call run() method to start execution      without start() method</li>
<li>Difference      between sleep() and wait() methods</li>
<li>When      sleep time expired, will the thread enters runnable state or running      state.</li>
<li>Difference      between notify() and notifyall() methods</li>
<li>Difference      between abstract and interface</li>
<li>When      we go for abstract and when we go for interface.</li>
<li>How do      you implement synchronization?  What      are the methods?</li>
<li>What      is polymorphism?  How do you      implement it?</li>
<li>Difference      between overriding and overloading?</li>
<li>Do      return type should be same when we implement method overriding</li>
<li>Can I      override Static methods?  Are you      sure?</li>
<li>Default      access specifiers of method declarations in Interface</li>
<li>Default      access specifiers of variable declarations in Interface</li>
<li>Can I      declare abstract method in non-abstract class</li>
</ol>
<p>Continues….</p>
<p>34.</p>
<p>Class A {</p>
<p>void display()</p>
<p>{</p>
<p>S.o.p( “class A” );</p>
<p>}</p>
<p>}</p>
<p>Class B extends A</p>
<p>{</p>
<p>void display()</p>
<p>{</p>
<p>S.o.p (“Class B” );</p>
<p>}</p>
<p>}</p>
<p>A obj = new B();</p>
<p>Obj.display();                        //what is the output of this line.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Class A {</p>
<p>Static void display()</p>
<p>{</p>
<p>S.o.p( “class A” );</p>
<p>}</p>
<p>}</p>
<p>Class B extends A</p>
<p>{</p>
<p>Static void display()</p>
<p>{</p>
<p>S.o.p (“Class B” );</p>
<p>}</p>
<p>}</p>
<p>A obj = new B();</p>
<p>Obj.display();                        //Are you sure what is the output of this line.  Why??</p>
<p>Class A {</p>
<p>Static int I = 10;</p>
<p>}</p>
<p>Class B extends A</p>
<p>{</p>
<p>Static int I = 30;</p>
<p>}</p>
<p>A obj = new B();</p>
<p>System.out.println(Obj.I);                   //what is the output of this line.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<ol>
<li>When      garbage collector will run?</li>
<li>Can we      call garbage collector? What is the method to call the same?</li>
<li>What      is serialization?  How do you      implement it?</li>
<li>What      happens when serializable object has reference to another object as      instance variable?</li>
<li>Difference      between private, protected and public access specifiers.</li>
<li>Can I      declare static class?</li>
<li>How do      you create object for inner class?</li>
</ol>
<p>J2EE</p>
<ol>
<li>Lifecycle      of Servlet</li>
<li>What      is the purpose of init() method.  We      can use the servlet constructor for initialization right?  Why do we need init() method still?</li>
<li>Difference      between ServletConfig and ServletContext?</li>
<li>Where      do you implement ServletConfig and ServletContext parameters?</li>
<li>Do we      need to override Service() method while writing Servlet class</li>
<li>Difference      between RequestDispatcher and SendRedirect</li>
<li>Can I      forward the request if I have already commited the response.  What exception will throw if we already      commited a response and forwards the request?</li>
<li>Having      Servlet classes, can I use Java Swing instead of JSP in presentation      layer?  How do you do that?</li>
<li>How do      you create session?</li>
<li>What      is the difference between getSession(true), getSession() and  getSession(false)?</li>
<li>How do      you declare session timeout in the Deployment Descriptor?</li>
</ol>
<p>Continues…</p>
<ol>
<li>What      is the difference between GET and POST methods?  What happen If I didn’t declare method      attribute in &lt;form&gt; tag?</li>
<li>What      are the other HTTP methods?  Purpose      of TRACE method?</li>
<li>What      is the use of setContentType() method?</li>
<li>How      may ways to get reference to ServletContext object?</li>
<li>What      is the purpose of ServletContextListener? Give some example when we can      use this?</li>
<li>What      is the purpose of HttpSessionAttributeListener?  What is the event type of this listener?</li>
<li>Purpose      of SingleThreadModel interface?</li>
<li>How      does the web container guarantee a servlet gets only one request at a time?</li>
<li>Life      cycle of JSP?</li>
<li>List      of implicit objects in JSP?</li>
<li>What      is the use of application object?       What is the API of out object?</li>
<li>How do      import packages in JSP?</li>
<li>How to      use &lt;jsp:useBean&gt;….purpose…how to set and get property..?</li>
<li>How do      you implement exception handling in JSP?</li>
<li>Difference      between include directive and &lt;jsp:include&gt;</li>
<li>What      is difference between Statement and Prepared Statement?</li>
<li>What      is the use of Callable Statement?</li>
<li>What      is inner join?</li>
<li>How do      you implement AJAX      concept in JavaScript?</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/240/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=240&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/09/27/java-j2ee-interview-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>
	</item>
		<item>
		<title>What is Platform Neutral?</title>
		<link>http://saravananmtech.wordpress.com/2010/09/15/what-is-platform-neutral/</link>
		<comments>http://saravananmtech.wordpress.com/2010/09/15/what-is-platform-neutral/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 04:33:56 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=237</guid>
		<description><![CDATA[Java programming language - This language is platform neutral which means it should run on any machine that has a compatible virtual machine. Essentially this means it should run on all versions of Windows, most Linux machines and most / all Sun machines. As far as we know it should run on later Apple Macs (OS [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=237&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span><span style="font-family:Default Sans Serif,Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">Java programming language - This language is platform neutral which means it should run on any machine that has a compatible virtual machine. Essentially this means it should run on all versions of Windows, most Linux machines and most / all Sun machines. As far as we know it should run on later Apple Macs (OS X) and BSD but both will require a 1.4 virtual machine and a little tweaking probably </span></span></p>
<p><span><span style="font-family:Default Sans Serif,Verdana,Arial,Helvetica,sans-serif;font-size:x-small;">NOTE : <em>Due to the platform neutral nature of the software there may be slight variations in the exact look and feel of the software on different platforms.</em></p>
<p><em><br />
</em></p>
<h2>Ok so what is a platform and what&#8217;s this Virtual Machine thingy?</h2>
<p>A platform would typically be defined as a hardware and operating system combination for instance one platform would be i386 / Windows 2000 (Intel i386 compatible hardware running the Windows 2000 operating system) another platform might be i386 / Linux (Again Intel i386 compatible hardware but this time running a flavour of Linux as the operating system).</p>
<p>There are hundreds of possible combinations of hardware and software each producing a different platform. To write software that works on all those different platforms (as does so equally well) is a difficult task. Fortunately Sun Microsystems took most of the work out of that by developing the Java language which is platform neutral or independent of the hardware and software combination that it runs on.</p>
<p>Now that sounds great but it does have a down side. All those different platforms use different instructions to achieve the same goals (eg displaying pictures on the screen). Java being neutral has to be able to &#8220;speak&#8221; all the different languages so that it can communicate with the underlying machine. This communication is handled by another piece of software called a virtual machine (VM). It takes the instructions in the software we wrote and converts them to instructions the machine understands.</p>
<p>The biggest problem with having to use the VM is that it slows down program execution. You may notice (especially on older machines) that things can take a little longer than you would normally expect. Refas uses the latest VM (1.4) which has made may improvements in speed an most people will find it fast enough. We have tested it with 7500 references and it still runs fast on an 800MHz system.</p>
<p>source: http://www.crazysquirrel.com/</p>
<p></span></span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/237/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/237/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/237/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=237&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/09/15/what-is-platform-neutral/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>
	</item>
		<item>
		<title>Time Count Down in JAVA</title>
		<link>http://saravananmtech.wordpress.com/2010/08/14/time-count-down-in-java/</link>
		<comments>http://saravananmtech.wordpress.com/2010/08/14/time-count-down-in-java/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 17:46:56 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=221</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=221&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://saravananmtech.files.wordpress.com/2010/08/12.jpg"><img class="alignnone size-full wp-image-232" title="1" src="http://saravananmtech.files.wordpress.com/2010/08/12.jpg" alt="" width="593" height="495" /></a></p>
<p><a href="http://saravananmtech.files.wordpress.com/2010/08/22.jpg"><img class="alignnone size-full wp-image-233" title="2" src="http://saravananmtech.files.wordpress.com/2010/08/22.jpg" alt="" width="622" height="443" /></a></p>
<p><a href="http://saravananmtech.files.wordpress.com/2010/08/32.jpg"><img class="alignnone size-full wp-image-234" title="3" src="http://saravananmtech.files.wordpress.com/2010/08/32.jpg" alt="" width="681" height="504" /></a></p>
<p><a href="http://saravananmtech.files.wordpress.com/2010/08/timecountdown_output2.jpg"><img class="alignnone size-full wp-image-235" title="TimeCountDown_Output" src="http://saravananmtech.files.wordpress.com/2010/08/timecountdown_output2.jpg" alt="" width="829" height="559" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/221/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/221/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/221/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=221&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/08/14/time-count-down-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/08/12.jpg" medium="image">
			<media:title type="html">1</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/08/22.jpg" medium="image">
			<media:title type="html">2</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/08/32.jpg" medium="image">
			<media:title type="html">3</media:title>
		</media:content>

		<media:content url="http://saravananmtech.files.wordpress.com/2010/08/timecountdown_output2.jpg" medium="image">
			<media:title type="html">TimeCountDown_Output</media:title>
		</media:content>
	</item>
		<item>
		<title>Java Interview Questions &#8211; Part 1</title>
		<link>http://saravananmtech.wordpress.com/2010/04/16/java-interview-questions-part-1/</link>
		<comments>http://saravananmtech.wordpress.com/2010/04/16/java-interview-questions-part-1/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 13:30:33 +0000</pubDate>
		<dc:creator>SARAVANAN SIVAJI</dc:creator>
				<category><![CDATA[com.saravananmtech.java]]></category>

		<guid isPermaLink="false">http://saravananmtech.wordpress.com/?p=217</guid>
		<description><![CDATA[Q1: How could Java classes direct program messages to the system console, but error messages, say to a file? Ans. The class System has a variable out that represents the standard output, and the variable err that represents the standard error device. By default, they both point at the system console. This how the standard output could [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=217&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Q1: How could Java classes direct program messages to the system console, but error messages, say to a file?</strong></p>
<p>Ans. The class System has a variable <em>out</em> that represents the standard output, and the variable <em>err</em> that represents the standard error device. By default, they both point at the system console. This how the standard output could be re-directed:<br />
Stream st = new Stream(new FileOutputStream(&#8220;output.txt&#8221;)); System.setErr(st); System.setOut(st);</p>
<p><strong>Q2. What&#8217;s the difference between an interface and an abstract class?</strong></p>
<p>A. An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.</p>
<p><strong>Q3. Why would you use a synchronized block vs. synchronized method?</strong></p>
<p>A. Synchronized blocks place locks for shorter periods than synchronized methods.</p>
<p><strong>Q4. Explain the usage of the keyword transient?</strong></p>
<p>A. This keyword indicates that the value of this member variable does not have to be serialized with the object. When the class will be de-serialized, this variable will be initialized with a default value of its data type (i.e. zero for integers).</p>
<div><strong>Q5. How can you force garbage collection?</strong></div>
<p>A. You can&#8217;t force GC, but could request it by calling System.gc(). JVM does not guarantee that GC will be started immediately.</p>
<p><strong>Q6. How do you know if an explicit object casting is needed?</strong></p>
<p>A. If you assign a superclass object to a variable of a subclass&#8217;s data type, you need to do explicit casting. For example:</p>
<p>Object a; Customer b; b = (Customer) a;</p>
<p>When you assign a subclass to a variable having a supeclass type, the casting is performed automatically.</p>
<p><strong>Q7. What&#8217;s the difference between the methods sleep() and wait()</strong></p>
<p>A. The code sleep(1000); puts thread aside for exactly one second. The codewait(1000), causes a wait of up to one second. A thread could stop waiting earlier if it receives the notify() or notifyAll() call. The method wait() is defined in the class Object and the method sleep() is defined in the class Thread.</p>
<p><strong>Q8. Can you write a Java class that could be used both as an applet as well as an application?</strong></p>
<p>A. Yes. Add a main() method to the applet.</p>
<p><strong>Q9. What&#8217;s the difference between constructors and other methods?</strong></p>
<p>A. Constructors must have the same name as the class and can not return a value. They are only called once while regular methods could be called many times.</p>
<p><strong>Q10. Can you call one constructor from another if a class has multiple constructors</strong></p>
<p>A. Yes. Use this() syntax.</p>
<p><strong>Q11. Explain the usage of Java packages.</strong></p>
<p>A. This is a way to organize files when a project consists of multiple modules. It also helps resolve naming conflicts when different packages have classes with the same names. Packages access level also allows you to protect data from being used by the non-authorized classes.</p>
<p><strong>Q12. If a class is located in a package, what do you need to change in the OS environment to be able to use it?</strong></p>
<p>A. You need to add a directory or a jar file that contains the package directories to the CLASSPATH environment variable. Let&#8217;s say a class Employee belongs to a package com.xyz.hr; and is located in the file c:\dev\com\xyz\hr\Employee.java. In this case, you&#8217;d need to add c:\dev to the variable CLASSPATH. If this class contains the method main(), you could test it from a command prompt window as follows:</p>
<p>c:\&gt;java com.xyz.hr.Employee</p>
<p><strong> Q13. What&#8217;s the difference between J2SDK 1.5 and J2SDK 5.0?</strong></p>
<p>A.There&#8217;s no difference, Sun Microsystems just re-branded this version.</p>
<p><strong>Q14. What would you use to compare two String variables &#8211; the operator == or the method equals()?</strong><br />
A. I&#8217;d use the method equals() to compare the values of the Strings and the == to check if two variables point at the same instance of a String object.</p>
<p><strong>Q15. Does it matter in what order catch statements for FileNotFoundException and IOExceptipon are written?</strong><br />
A. Yes, it does. The FileNoFoundException is inherited from the IOException. Exception&#8217;s subclasses have to be caught first.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/saravananmtech.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/saravananmtech.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/saravananmtech.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/saravananmtech.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/saravananmtech.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/saravananmtech.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/saravananmtech.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/saravananmtech.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=saravananmtech.wordpress.com&amp;blog=5183489&amp;post=217&amp;subd=saravananmtech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://saravananmtech.wordpress.com/2010/04/16/java-interview-questions-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">saravananmtech</media:title>
		</media:content>
	</item>
	</channel>
</rss>
