<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DE8FQXo-eyp7ImA9WhRRFE4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926</id><updated>2011-11-27T15:33:30.453-08:00</updated><title>Computer Science Buzz: C,C++,Java,DS,DataBase</title><subtitle type="html">C,C++,Java Language, Data Structure, DataBase Queries,
Project Report &amp;amp; Running Project,Unix/Linux</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://itmcacs.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/CcjavadsdatabaseMcaCusat" /><feedburner:info uri="ccjavadsdatabasemcacusat" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>CcjavadsdatabaseMcaCusat</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DEABSX07fyp7ImA9WhdQEEk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-7294465458599756572</id><published>2011-08-11T00:05:00.000-07:00</published><updated>2011-08-11T00:12:38.307-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-11T00:12:38.307-07:00</app:edited><title>Quick Revise: Java OOP's Concepet</title><content type="html">&lt;br /&gt;*******************Brushup: Exception Handling *************** &lt;br /&gt;&lt;br /&gt;Q 1. Which package has the Exception handling related classes ?&lt;br /&gt;&lt;br /&gt;            Java.lang&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 2. What are the two types of Exceptions ?&lt;br /&gt;&lt;br /&gt;            Checked &amp; Unchecked&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 3. What is the base class of all Exceptions ?&lt;br /&gt;&lt;br /&gt;            Throwable&lt;br /&gt;&lt;br /&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-rmJudk1ES-U/TkOAgnmxiuI/AAAAAAAAAEI/B4u7lxnSeeM/s1600/%2521cid_9FECA8F0D6754A9D9975CEE9933501D3%2540unibizind.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 260px;" src="http://1.bp.blogspot.com/-rmJudk1ES-U/TkOAgnmxiuI/AAAAAAAAAEI/B4u7lxnSeeM/s320/%2521cid_9FECA8F0D6754A9D9975CEE9933501D3%2540unibizind.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5639492456273775330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 4. What is the difference between Exception and Error in java ? &lt;br /&gt;&lt;br /&gt;            Answer was given in my previous mail&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 5. What is the difference between throw and throws? &lt;br /&gt;&lt;br /&gt;            Answer was given in my previous mail&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 6. Differentiate between Checked Exceptions and Unchecked Exceptions? &lt;br /&gt;&lt;br /&gt;            Answer was given in my previous mail&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 7. What are User defined Exceptions? &lt;br /&gt;&lt;br /&gt;            We can write our own exception class by extending Exception and based on certain condition we can throw this user defined exception in our program.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 8. Can a catch block exist without a try block? &lt;br /&gt;&lt;br /&gt;           No&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 9. Can a finally block exist with a try block but without a catch? &lt;br /&gt;&lt;br /&gt;           Yes&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 10. What will happen to the Exception object after exception handling? &lt;br /&gt;&lt;br /&gt;           It will be garbage collected&lt;br /&gt;&lt;br /&gt;                &lt;br /&gt;&lt;br /&gt;Q 11. The subclass exception should precede the base class exception when used within the catch clause. True/False? &lt;br /&gt;&lt;br /&gt;           True&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 12. The statements following the throw keyword in a program are not executed. True/False? &lt;br /&gt;&lt;br /&gt;           True&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 13. How does finally block differ from finalize() method? &lt;br /&gt;&lt;br /&gt;                finally -The finally block is optional and provides a mechanism to clean up regardless of what happens within the try block (except System.exit(0) call). Use the finally block to close files or to release other system resources like database connections, statements etc.&lt;br /&gt;&lt;br /&gt;finalize() - method helps in garbage collection. A method that is invoked before an object is discarded by the garbage collector, allowing it to clean up its state. Should not be used to release non-memory resources like file handles, sockets, database connections etc.  because Java has only a finite number of these resources and you do not know when the garbage collection is going to kick in to release these non-memory resources through the finalize() method.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Q 14. What are the constraints imposed by overriding on exception handling? &lt;br /&gt;&lt;br /&gt;                An overriding method in a subclass may only throw exceptions declared in the parent class or children of the exceptions declared in the parent class.&lt;br /&gt;&lt;br /&gt;************************************************************************************&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-7294465458599756572?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ptAenLW_xJrgV7Om4RlAp2inwsk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ptAenLW_xJrgV7Om4RlAp2inwsk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ptAenLW_xJrgV7Om4RlAp2inwsk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ptAenLW_xJrgV7Om4RlAp2inwsk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/c73dDvqPPc8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/7294465458599756572/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/08/quick-revise-java-oops-concepet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7294465458599756572?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7294465458599756572?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/c73dDvqPPc8/quick-revise-java-oops-concepet.html" title="Quick Revise: Java OOP's Concepet" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-rmJudk1ES-U/TkOAgnmxiuI/AAAAAAAAAEI/B4u7lxnSeeM/s72-c/%2521cid_9FECA8F0D6754A9D9975CEE9933501D3%2540unibizind.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/08/quick-revise-java-oops-concepet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08NQH47fip7ImA9WhdQEEk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-2400322946714464300</id><published>2011-08-09T03:09:00.000-07:00</published><updated>2011-08-10T23:58:11.006-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-10T23:58:11.006-07:00</app:edited><title>Core Java: Miscellaneous OOP's concepet in java</title><content type="html">&lt;strong&gt;*********** First 1. **************&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;// Q. 1) What will be the output ?&lt;br /&gt;public class Hello1 {&lt;br /&gt;&lt;br /&gt;	public static void main (String args[]) {&lt;br /&gt;		&lt;br /&gt;		System.out.println (A.a);&lt;br /&gt;		System.out.println (B.b);&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Q. 2) Why static block of class 'A' doesn't execute ?&lt;br /&gt;// Q. 3) Why class 'A' doesn't load when we access the final variable 'a' ?&lt;br /&gt;class A {&lt;br /&gt;&lt;br /&gt;	static {&lt;br /&gt;		System.out.println ("Hi, This is static block of class 'A' !!!!");&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	public static final int	a	= 100;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Q. 4) Shall the following class 'B' compile successfully, Why?&lt;br /&gt;class B {&lt;br /&gt;&lt;br /&gt;	static {&lt;br /&gt;		System.out.println ("Hi, This is static block of class 'B' !!!!");&lt;br /&gt;		b = 200;&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	public static final int	b;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;*******************************************************************&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-2400322946714464300?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HivKauBuI2OitkorrJVsOUqwI7M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HivKauBuI2OitkorrJVsOUqwI7M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HivKauBuI2OitkorrJVsOUqwI7M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HivKauBuI2OitkorrJVsOUqwI7M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/EbP0RNRBAyQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/2400322946714464300/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/08/core-java-miscellaneous-oops-concepet.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2400322946714464300?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2400322946714464300?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/EbP0RNRBAyQ/core-java-miscellaneous-oops-concepet.html" title="Core Java: Miscellaneous OOP's concepet in java" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/08/core-java-miscellaneous-oops-concepet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08DRX4_fip7ImA9WhdQEEk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-7929337278836744551</id><published>2011-08-09T01:50:00.000-07:00</published><updated>2011-08-10T23:57:54.046-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-10T23:57:54.046-07:00</app:edited><title>The meaning of AAA rating for countries ???</title><content type="html">&lt;br /&gt;&lt;strong&gt;What is a credit rating?&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A credit rating is an opinion of the general creditworthiness of individuals, companies and countries. Lower credit ratings result in higher borrowing costs because the borrower is deemed to carry a higher risk of default. A downgrade for America would mean US bond investors would want to get paid more to compensate for the risk of holding government debt.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What are sovereign credit ratings? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sovereign credit ratings measure the risk of investing in countries – political as well as economic risk. For instance, Standard &amp; Poor's lowered its AAA credit rating for the US government partly because the talks that led to last week's deal on hiking the borrowing limit "took too long" and were "at times too divisive".&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the role of credit rating agencies? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Credit rating agencies assess the risk of investing in corporations and governments. The largest are Moody's, Standard and Poor's and Fitch Ratings. They also provide a wide array of financial data and information on bonds, equities and mutual funds.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How do they make money? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Agencies typically receive payment for their services either from the borrower that requests the rating or from subscribers who receive the published ratings and related credit reports.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How much weight does a rating carry? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;A lot of investment, such as corporate and government bonds, must carry a credit rating. This has resulted in credit rating agencies becoming very influential. However, their role in the sub-prime crisis, when they rated various mortgage-backed financial instruments that have subsequently been branded "toxic", has damaged their reputation.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What do Standard and Poor's "letter" ratings mean? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;AAA - Extremely strong capacity to meet financial commitments. Highest rating&lt;br /&gt; AA - Very strong capacity to meet financial commitments&lt;br /&gt; A - Strong capacity to meet financial commitments, but somewhat susceptible to adverse economic conditions and changes in circumstances&lt;br /&gt; BBB - Adequate capacity to meet financial commitments, but more subject to adverse economic conditions&lt;br /&gt; BBB- (minus) - this is the lowest rating before non-investment grade&lt;br /&gt; BB: Less vulnerable in the near-term but faces major ongoing uncertainties to adverse business, financial and economic conditions&lt;br /&gt; B: More vulnerable to adverse business, financial to meet financial commitments&lt;br /&gt; CCC: Currently vulnerable and dependent on meet financial commitments&lt;br /&gt; CC: Currently highly vulnerable&lt;br /&gt; C: A bankruptcy petition has been filed or similar continued&lt;br /&gt; D: Payment default on financial commitments&lt;br /&gt; &lt;br /&gt;Ratings in the 'AAA,' 'AA,' 'A' and 'BBB' categories are regarded by the market as investment grade.&lt;br /&gt; &lt;br /&gt;Ratings in the 'BB,' 'B,' 'CCC,' 'CC' and 'C' categories are regarded as having significant speculative characteristics.&lt;br /&gt; &lt;br /&gt;Ratings from 'AA' to 'CCC' may be modified by the addition of a plus (+) or minus (-) sign to show relative standing within the major rating categories.&lt;br /&gt; &lt;br /&gt;NR indicates that no rating had been requested, there is insufficient information on which to base a rating, or that S&amp;P does not rate a particular obligation as a matter of policy.&lt;br /&gt; &lt;br /&gt;&lt;strong&gt;What is an outlook definition? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;An S&amp;P rating outlook assesses the potential direction in which a rating will move over the next six months to two years.&lt;br /&gt; Positive - may be raised&lt;br /&gt; Negative - may be lowered &lt;br /&gt; Stable - unlikely to change&lt;br /&gt; Developing - may be raised or lowered&lt;br /&gt; NM - not meaningful&lt;br /&gt;&lt;br /&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-7929337278836744551?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xZp8OOKwS1OHFrYL5DXLhCRMUFU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xZp8OOKwS1OHFrYL5DXLhCRMUFU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xZp8OOKwS1OHFrYL5DXLhCRMUFU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xZp8OOKwS1OHFrYL5DXLhCRMUFU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/har7fixxKtQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/7929337278836744551/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/08/meaning-of-aaa-rating-for-countries.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7929337278836744551?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7929337278836744551?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/har7fixxKtQ/meaning-of-aaa-rating-for-countries.html" title="The meaning of AAA rating for countries ???" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/08/meaning-of-aaa-rating-for-countries.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIGSXkyfCp7ImA9WhZbGE8.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-7302433095073525781</id><published>2011-06-23T04:08:00.000-07:00</published><updated>2011-06-23T04:12:08.794-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-23T04:12:08.794-07:00</app:edited><title>Java Interview Questions</title><content type="html">&lt;span style="font-weight:bold;"&gt;OOPS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. What is an Object?&lt;br /&gt;&lt;br /&gt;2. What is a Class?&lt;br /&gt;&lt;br /&gt;3. What is OOAD?&lt;br /&gt;&lt;br /&gt;4. What is Data Abstraction ?&lt;br /&gt;&lt;br /&gt;5. What is Data Encapsulation?&lt;br /&gt;&lt;br /&gt;6. What is the difference between Data Abstraction and Information Hiding?&lt;br /&gt;&lt;br /&gt;7. What is Inheritance and what are different types of it?&lt;br /&gt;&lt;br /&gt;8. Why Java uses Singly rooted hierarchy?&lt;br /&gt;&lt;br /&gt;9. Why does Java not support Multiple Inheritance?&lt;br /&gt;&lt;br /&gt;10. Why is Java not 100% pure OOP language?&lt;br /&gt;&lt;br /&gt;11. What is Early Binding?&lt;br /&gt;&lt;br /&gt;12. What is Polymorphism/Late Binding?&lt;br /&gt;&lt;br /&gt;13. What is method overloading?&lt;br /&gt;&lt;br /&gt;14. What is method overriding?&lt;br /&gt;&lt;br /&gt;15. How is Java different from C++?&lt;br /&gt;&lt;br /&gt;16. What is UML and how is it useful in designing large systems?&lt;br /&gt;&lt;br /&gt;17. Is UML useful for procedural programming ?&lt;br /&gt;&lt;br /&gt;18. What are different notations used in UML ?&lt;br /&gt;&lt;br /&gt;19. What is a Use case and an Actor?&lt;br /&gt;&lt;br /&gt;20. How to identify an Actor?&lt;br /&gt;&lt;br /&gt;21. What is Generalization?&lt;br /&gt;&lt;br /&gt;22. What is Association and how it maps into a Java class?&lt;br /&gt;&lt;br /&gt;23. What is Aggregation and how it maps into a Java class?&lt;br /&gt;&lt;br /&gt;24. What is Composition and how it maps into a Java class?&lt;br /&gt;&lt;br /&gt;25. What is Dependency and how it maps into a Java class?&lt;br /&gt;&lt;br /&gt;26. What is the purpose of State machine diagrams?&lt;br /&gt;&lt;br /&gt;27. What are different kinds of Structure diagrams?&lt;br /&gt;&lt;br /&gt;28. What are different kinds of Interaction diagrams?&lt;br /&gt;&lt;br /&gt;29. What are different kinds of Behavior diagrams?&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Java Fundamentals&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;30. What is a Java Virtual Machine (JVM)?&lt;br /&gt;&lt;br /&gt;31. What is a JVM consisted of?&lt;br /&gt;&lt;br /&gt;32. What is a class loader and what is its responsibilities?&lt;br /&gt;&lt;br /&gt;33. What is heap and stack?&lt;br /&gt;&lt;br /&gt;34. How is your Java program executed inside JVM?&lt;br /&gt;&lt;br /&gt;35. What is Java class file's magic number?&lt;br /&gt;&lt;br /&gt;36. How JVM performs Thread Synchronization?&lt;br /&gt;&lt;br /&gt;37. How JVM performs Garbage Collection?&lt;br /&gt;&lt;br /&gt;38. How to profile heap usage?&lt;br /&gt;&lt;br /&gt;39. What will you do if VM exits while printing "OutOfMemoryError" and increasing max heap size doesn't help?&lt;br /&gt;&lt;br /&gt;40. Should one pool objects to help Garbage Collector?Should one call System.gc() periodically?&lt;br /&gt;&lt;br /&gt;41. An application has a lot of threads and is running out of memory, why?&lt;br /&gt;&lt;br /&gt;42. If your program is I/O bound or running in native methods, do these activities engage JVM?&lt;br /&gt;&lt;br /&gt;43. What is the difference between interpreted code and compiled code?&lt;br /&gt;&lt;br /&gt;44. Why Java based GUI intensive program has performance issues?&lt;br /&gt;&lt;br /&gt;45. What is 64 bit Java ?&lt;br /&gt;&lt;br /&gt;46. What is the difference between JVM and JRE?&lt;br /&gt;&lt;br /&gt;47. What are different primitive datatypes in Java?&lt;br /&gt;&lt;br /&gt;48. What are expressions,statements and blocks in Java?&lt;br /&gt;&lt;br /&gt;49. What is a transient variable?&lt;br /&gt;&lt;br /&gt;50. What is the difference between the '&amp;' operator and the '&amp;&amp;' operator?&lt;br /&gt;&lt;br /&gt;51. Why main method of Java has public static void?&lt;br /&gt;&lt;br /&gt;52. If you have static block, constructor and main method in Java file then what will be the sequence of method calls?&lt;br /&gt;&lt;br /&gt;53. What are the command line arguments?&lt;br /&gt;&lt;br /&gt;54. Does Java support multi dimensional arrays?&lt;br /&gt;&lt;br /&gt;55. What are the restrictions for static method?&lt;br /&gt;&lt;br /&gt;56. Why a abstract method cannot be static?&lt;br /&gt;&lt;br /&gt;57. Is 'sizeof' a keyword?&lt;br /&gt;&lt;br /&gt;58. What is the precedence of operators in Java?&lt;br /&gt;&lt;br /&gt;59. How is an argument passed in Java methods?&lt;br /&gt;&lt;br /&gt;60. What is the difference between class variable, member variable and automatic(local) variable?&lt;br /&gt;&lt;br /&gt;61. When are static and non static variables of a class initialized?&lt;br /&gt;&lt;br /&gt;62. Can shift operators be applied to float types?&lt;br /&gt;&lt;br /&gt;63. What are different Java declarations and their associated rules?&lt;br /&gt;&lt;br /&gt;64. What are Java Modifiers?&lt;br /&gt;&lt;br /&gt;65. Explain final modifier.&lt;br /&gt;&lt;br /&gt;66. Can you change the reference of the final object?&lt;br /&gt;&lt;br /&gt;67. Can abstract class be instantiated?&lt;br /&gt;&lt;br /&gt;68. When does the compiler insist that the class must be abstract?&lt;br /&gt;&lt;br /&gt;69. Where can static modifiers be used?&lt;br /&gt;&lt;br /&gt;70. What is static initializer code?&lt;br /&gt;&lt;br /&gt;71. Can an anonymous class implement an interface and extend a class at the same time?&lt;br /&gt;&lt;br /&gt;72. What are volatile variables?&lt;br /&gt;&lt;br /&gt;73. Can protected or friendly features be accessed from different packages?&lt;br /&gt;&lt;br /&gt;74. How many ways can one write an infinite loop?&lt;br /&gt;&lt;br /&gt;75. When do you use 'continue' and 'break' statements?&lt;br /&gt;&lt;br /&gt;76. What is the difference between 'while' and 'do while' loop?&lt;br /&gt;&lt;br /&gt;77. What is an Assertion and why using assertion in your program is a good idea ?&lt;br /&gt;&lt;br /&gt;78. Explain Assertions with a code exmaple.&lt;br /&gt;&lt;br /&gt;79. How many forms of assertions we have?&lt;br /&gt;&lt;br /&gt;80. When assertions should be avoided?&lt;br /&gt;&lt;br /&gt;81. What situations are best suitable for implementing assertions?&lt;br /&gt;&lt;br /&gt;82. What is Exception ?&lt;br /&gt;&lt;br /&gt;83. What is a user-defined exception?&lt;br /&gt;&lt;br /&gt;84. What do you know about the garbage collector?&lt;br /&gt;&lt;br /&gt;85. Why Java does not support pointers?&lt;br /&gt;&lt;br /&gt;86. Does garbage collection guarantee that a program will not run out of memory?&lt;br /&gt;&lt;br /&gt;87. What is finally in Exception handling?&lt;br /&gt;&lt;br /&gt;88. What can prevent the execution of the code in finally block?&lt;br /&gt;&lt;br /&gt;89. Explain 'try','catch' and 'finally' blocks?&lt;br /&gt;&lt;br /&gt;90. Define Checked and Unchecked exception.&lt;br /&gt;&lt;br /&gt;91. What is the difference between an abstract class and an interface?&lt;br /&gt;&lt;br /&gt;92. What is the use of interface?&lt;br /&gt;&lt;br /&gt;93. What is serializable interface?&lt;br /&gt;&lt;br /&gt;94. Does a class inherit constructors from its superclass?&lt;br /&gt;&lt;br /&gt;95. What's the difference between constructors and other methods?&lt;br /&gt;&lt;br /&gt;96. If the method to be overridden has access type 'protected', can subclass have the access type as 'private'?&lt;br /&gt;&lt;br /&gt;97. If you use super() or this() in a constructor where should it appear in the constructor?&lt;br /&gt;&lt;br /&gt;98. What modifiers may be used with an inner class that is a member of an outer class?&lt;br /&gt;&lt;br /&gt;99. Can an inner class be defined inside a method?&lt;br /&gt;&lt;br /&gt;100. What is an anonymous class?&lt;br /&gt;&lt;br /&gt;101. What is a thread?&lt;br /&gt;&lt;br /&gt;102. What is the difference between process and threads?&lt;br /&gt;&lt;br /&gt;103. What are two types of multitasking?&lt;br /&gt;&lt;br /&gt;104. What are two ways of creating threads in Java and why so?&lt;br /&gt;&lt;br /&gt;105. How does multithreading take place on a computer with a single CPU?&lt;br /&gt;&lt;br /&gt;106. How a Java object be locked for exclusive use by a given thread?&lt;br /&gt;&lt;br /&gt;107. What is Synchronization?&lt;br /&gt;&lt;br /&gt;108. Explain wait(),notify(), and notifyAll() methods?&lt;br /&gt;&lt;br /&gt;109. What is a Daemon thread?&lt;br /&gt;&lt;br /&gt;110. How a dead thread can be started?&lt;br /&gt;&lt;br /&gt;111. What is the difference between String and StringBuffer?&lt;br /&gt;&lt;br /&gt;112. How is '==' different from .equals() method in case of String objects?&lt;br /&gt;&lt;br /&gt;113. Explain StreamTokenizer?&lt;br /&gt;&lt;br /&gt;114. What is Collection?&lt;br /&gt;&lt;br /&gt;115. Explain List,Set and Map.&lt;br /&gt;&lt;br /&gt;116. What is the serialization?&lt;br /&gt;&lt;br /&gt;117. What is the difference between Serializable and Externalizable interface?&lt;br /&gt;&lt;br /&gt;118. What is memory leak?&lt;br /&gt;&lt;br /&gt;119. Difference between ArrayList and Vector class?&lt;br /&gt;&lt;br /&gt;120. What is the difference between Hashtable and HashMap?&lt;br /&gt;&lt;br /&gt;121. What is JFC?&lt;br /&gt;&lt;br /&gt;122. What is the difference between JFC Swing and AWT?&lt;br /&gt;&lt;br /&gt;123. What is the base class for all swing components?&lt;br /&gt;&lt;br /&gt;124. What are lightweight and heavyweight components ?&lt;br /&gt;&lt;br /&gt;125. How can a GUI component handle its own events?&lt;br /&gt;&lt;br /&gt;126. What is a Layout Manager and what are its different types and their advantages?&lt;br /&gt;&lt;br /&gt;127. How are the elements of a GridBagLayout organized?&lt;br /&gt;&lt;br /&gt;128. What are the problems faced by Java programmers in absence of layout managers?&lt;br /&gt;&lt;br /&gt;129. Where the CardLayout is used?&lt;br /&gt;&lt;br /&gt;130. What is the difference between GridLayout and GridBagLayout?&lt;br /&gt;&lt;br /&gt;131. How will you add a panel to a frame?&lt;br /&gt;&lt;br /&gt;132. What is the difference between Application and Applet?&lt;br /&gt;&lt;br /&gt;133. Explain Lifecycle of the Applet and what is the order of method invocation in an applet?&lt;br /&gt;&lt;br /&gt;134. What is the difference between Java class and bean?&lt;br /&gt;&lt;br /&gt;135. What is difference between trusted and untrusted applet?&lt;br /&gt;&lt;br /&gt;136. How do you set Java Library path programmatically?(new)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;137. Explain the usage of java.util.Date and more classes and APIs for date handling in Java?(new)&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JDBC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;138. What is JDBC ?&lt;br /&gt;&lt;br /&gt;139. What are four drivers available in JDBC?&lt;br /&gt;&lt;br /&gt;140. How do you establish database connection using JDBC?&lt;br /&gt;&lt;br /&gt;141. What are the different types of Statements?&lt;br /&gt;&lt;br /&gt;142. What is PreparedStatement and how is different from Statement?&lt;br /&gt;&lt;br /&gt;143. What is the difference between executeQuery () and execute() ?&lt;br /&gt;&lt;br /&gt;144. What is the difference between executeQuery () and executeUpdate()?&lt;br /&gt;&lt;br /&gt;145. How do you call a stored procedure in Java?&lt;br /&gt;&lt;br /&gt;146. What are new features from JDBC2.0 onwards?&lt;br /&gt;&lt;br /&gt;147. How can a cursor move in scrollable result sets?&lt;br /&gt;&lt;br /&gt;148. Differentiate TYPE_SCROLL_INSENSITIVE and TYPE_SCROLL_SENSITIVE?&lt;br /&gt;&lt;br /&gt;149. How will you differentiate the following two ways of loading a database driver?&lt;br /&gt;&lt;br /&gt;150. How can you display a particular web page from an applet?(new)&lt;br /&gt;&lt;br /&gt;151. How can you get the hostname on the basis of IP addres ?(new)&lt;br /&gt;&lt;br /&gt;152. How can you get an IP address of a machine from its hostname?(new)&lt;br /&gt;&lt;br /&gt;153. How do you know who is accessing your server?(new)&lt;br /&gt;&lt;br /&gt;154. What are different socket options?(new)&lt;br /&gt;&lt;br /&gt;155. What should I use a ServerSocket or DatagramSocket in my applications?(new)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note: Don't remember the answer of these question but try ti have the concept then you can see the magic while interview.&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-7302433095073525781?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/rXMTBNtDrbrUKVO6eONGrg4BLjQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rXMTBNtDrbrUKVO6eONGrg4BLjQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/rXMTBNtDrbrUKVO6eONGrg4BLjQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/rXMTBNtDrbrUKVO6eONGrg4BLjQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/qxms_mzih6E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/7302433095073525781/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/06/java-interview-questions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7302433095073525781?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7302433095073525781?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/qxms_mzih6E/java-interview-questions.html" title="Java Interview Questions" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/06/java-interview-questions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcERXY8fSp7ImA9WhZbEk8.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-5372153908425428905</id><published>2011-06-16T04:31:00.000-07:00</published><updated>2011-06-16T04:33:24.875-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-16T04:33:24.875-07:00</app:edited><title>Java: Object Class</title><content type="html">Class&lt;span style="font-weight:bold;"&gt; Object&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;java.lang.Object&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class &lt;span style="font-weight:bold;"&gt;Object&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    a) Class Object is the root of the class hierarchy.&lt;br /&gt;    b) Every class has Object as a superclass.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Methods:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;clone() &lt;/span&gt; : Creates and returns a copy of this object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;equals(Object obj&lt;/span&gt;)  :  Indicates whether some other object is "equal to" this one.&lt;br /&gt;&lt;br /&gt;finalize()  :  Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;getClass()&lt;/span&gt;  : Returns the runtime class of an object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;hasCode()&lt;/span&gt;   : Returns a hash code value for the object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;notify() &lt;/span&gt;  : Wakes up a single thread that is waiting on this object's monitor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;notifyAll()&lt;/span&gt;  : Wakes up all threads that are waiting on this object's monitor.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;toString()&lt;/span&gt;  : Returns a string representation of the object.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;wait() &lt;/span&gt; :  Causes current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-5372153908425428905?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x3nEzqdUKtSyK-nDdg8-dW0ORCU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x3nEzqdUKtSyK-nDdg8-dW0ORCU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/x3nEzqdUKtSyK-nDdg8-dW0ORCU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x3nEzqdUKtSyK-nDdg8-dW0ORCU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/2JTMLvJdvhg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/5372153908425428905/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/06/java-object-class.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/5372153908425428905?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/5372153908425428905?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/2JTMLvJdvhg/java-object-class.html" title="Java: Object Class" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/06/java-object-class.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8NQn8yeSp7ImA9WhZbEEk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-1658998042449105743</id><published>2011-06-14T02:44:00.000-07:00</published><updated>2011-06-14T02:48:13.191-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-14T02:48:13.191-07:00</app:edited><title>Struts / Java / J2EE Frequently-Asked Interview Questions</title><content type="html">1. Are Struts's action classes Thread-safe?&lt;br /&gt;Yes. Action classes are based on "one-instance and many-threads". This is to conserve resources and to provide the best possible throughput.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. What are the various Struts Tag libraries?&lt;br /&gt;There are various struts tags. But the most-repeated tags are:&lt;br /&gt;struts-bean.tld&lt;br /&gt;struts-html.tld&lt;br /&gt;struts-logic.tld&lt;br /&gt;struts-nested.tld&lt;br /&gt;&lt;br /&gt;3. What is ActionMapping in struts?&lt;br /&gt;Action mapping defines the flow of one request. The possible sequence is&lt;br /&gt;User -&gt; request -&gt; Form -&gt; Validation -&gt; Business Code -&gt; Forward -&gt; JSP -&gt; response -&gt; User.&lt;br /&gt;The components involved are Action classes, Forms and JSP.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. What are the advantages of having multiple struts-config in the same application?&lt;br /&gt;The implementation with many struts-config is to organize the development work, so that many people may be involved and it is some organized way of doing things. But this would result in some compromise in performance(speed). Technically there is no any difference between single and multiple struts-config files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. What are the ways in which resource file can be used in struts?&lt;br /&gt;Defining message resources in struts-config file.&lt;br /&gt;Programmatically using resource files in Java classes or in JSP files.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. Explain the term 'architecture of the application'?&lt;br /&gt;Architecture is the set of rules (or framework) to bring in some common way of assembling or using J2EE components in the application. This helps in bringing consistency between codes developed by various developers in the team.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. Which is the architecture followed by struts?&lt;br /&gt;Struts follows MVC architecture.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. What are components corresponding o M, V and C in struts?&lt;br /&gt;&lt;br /&gt;Model : The model represents the data of an application. Anything that an application will persist becomes a part of model. The model also defines the way of accessing this data ( the business logic of application) for manipulation. It knows nothing about the way the data will be displayed by the application. It just provides service to access the data and modify it. Here 'Form Bean' represents Model layer.&lt;br /&gt;&lt;br /&gt;View : The view represents the presentation of the application. The view queries the model for its content and renders it. The way the model will be rendered is defined by the view. The view is not dependent on data or application logic changes and remains same even if the business logic undergoes modification. JSP represents View Layer.&lt;br /&gt;&lt;br /&gt;Controller : All the user requests to the application go through the controller. The controller intercepts the requests from view and passes it to the model for appropriate action. Based on the result of the action on data, the controller directs the user to the subsequent view. Action classes (action servlets) represent Controller layer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9. Differentiate between the terms 'Design Patterns', 'Framework' and 'Architecture'.&lt;br /&gt;Design Pattern: The various solutions arrived at for the known problem. This helps to avoid re-inventing the wheel. The risk-free solution can be easily used by others. For example, singleton is the design pattern that you can use instantly to enfore one object per class. You do not need to think of this on your own.&lt;br /&gt;Framework: A framework is a structure or set of rules, used to solve or address complex issues. It is basically a reusable designf for the J2EE applications. For example, Struts, JSF,etc., are the frameworks. You can use these frameworks based on the requirements of your application and each has its own set of advantages.&lt;br /&gt;&lt;br /&gt;Architecture: It is a design that describes how the various components in the application fit together. For example, MVC is an architecture which is helpful to define how the components interact within the application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. What is the difference between ActionForm and DynaActionForm?&lt;br /&gt;In action form, you need to define the form class that extends ActionForm explicitly, whereas you can define the form dynamically inside the struts-config file when using DynaActionForm.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. How can you use Validator framework in struts?&lt;br /&gt;Validator Frameworks are helpful when the application needs server-side validation such that the particular set of validations occur very frequently within the same application. This avoids writing complex code in validation() method in every form bean. Using validator framework, there are different pre-written validations in place. You can customize these validations in XML file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. What are client-side and server-side vaidations?&lt;br /&gt;Client-side validations: These are the validations that id done using javascripts. There is always a danger involved that the user can get through (crack-through) these validations. But for some simple validations, like converting lower-case to upper-case or date validations can be done, you can use javascripts.&lt;br /&gt;Server-side validations: These are the validations done in server-side using Java components (Form bean or in business logics) where the user has no chance to crookedly get through the system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;13. What are the advantages &amp; differences between using validate() method in form over validations using validator framework.&lt;br /&gt;Refer to the previous-answer.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14. Define the terms authentication and authorisation.&lt;br /&gt;Authentication is the process/rule that validates if the user is allowed to access the system or not.&lt;br /&gt;Authorization is the process/rule that validates if the user is allowed to access the particular part of the system or not. This occurs after user's successful authentication.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15. What are the components provided in J2EE to perform authentication and authorization?&lt;br /&gt;Authentication – RequestProcessor and/or Filter.&lt;br /&gt;Authorization - DTO, JDO or Java or Action classes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16. Give the difference between between 'DispatchAction' and 'Action'.&lt;br /&gt;A DispatchAction contains various different methods other than the standard execute() method in Action classes. These methods are executed based on some request parameter. For example, you can code in such a way that three buttons (namely Insert, Delete, Update) buttons correspond to different methods such as insert(), delete() and udpate(). The submit button in JSP would have the property that has the value which matches to any one of the methods defined in DispatchAction class.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17. What is pagination technique? How can you design them in struts?&lt;br /&gt;Pagination is the technique where the bulk of results are split into different pages and only the information where the user can conveniently see are displayed in a page. (Like in Goooooogle). This can be achieved in many ways, but the simplest method is to have a query string (say http://www.testwebsite?pageNumber=2) would lead to information corresponding to resultset rows from 11 to 20. Assuming that you want to display 10 related rows of information, you can set the formula as follows:&lt;br /&gt;Starting row = (pageNumber-1) * + 1 which is equal to 11.&lt;br /&gt;Ending row = Starting row + which is equal to 20.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;18. How can you populate the drop-down list using form properties?&lt;br /&gt;There are many ways for this. But the best method is to use which defines collection that needs to be used to populate the drop-down list, the property to store the selected value and the collection that is used to display the labels (what we see in JSP page). For Example,&lt;br /&gt;&lt;br /&gt;html:options collection="form-collection-property"&lt;br /&gt;property="form-property"&lt;br /&gt;labelProperty="form-another-collection-property"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19. What is the XML parser provided in struts? Can you use it for other purposes?&lt;br /&gt;'Digester' framework. Yes we can use for our applications to store and parse our application-related data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;20. Difference between Struts 1.0 and 1.1&lt;br /&gt;&lt;br /&gt;    * Perform() method was replaced by execute()&lt;br /&gt;    * DynaActionForms are introduced.&lt;br /&gt;    * Tiles Concept is introduced&lt;br /&gt;    * We can write our own Controller by Inheriting RequestProcessor&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-1658998042449105743?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/VVa_UjQ_OmLnObIR0jKQS9xhndI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VVa_UjQ_OmLnObIR0jKQS9xhndI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/VVa_UjQ_OmLnObIR0jKQS9xhndI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/VVa_UjQ_OmLnObIR0jKQS9xhndI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/uP2kjIYF-GU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/1658998042449105743/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/06/struts-java-j2ee-frequently-asked.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/1658998042449105743?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/1658998042449105743?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/uP2kjIYF-GU/struts-java-j2ee-frequently-asked.html" title="Struts / Java / J2EE Frequently-Asked Interview Questions" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>1</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/06/struts-java-j2ee-frequently-asked.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEANR387fSp7ImA9WhZUFkQ.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-1217691884309616343</id><published>2011-06-10T01:48:00.000-07:00</published><updated>2011-06-10T02:06:36.105-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-10T02:06:36.105-07:00</app:edited><title>Java Classes and Objects Interview Questions</title><content type="html">Q1. What restrictions are placed on method overloading?&lt;br /&gt;&lt;br /&gt;Two methods may not have the same name and argument list but different return types.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q2. What is the difference between String and StringBuffer?&lt;br /&gt;&lt;br /&gt;String objects are immutable whereas StringBuffer objects are not. StringBuffer unlike Strings support growable and modifiable strings.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q3. Can a private method of a superclass be declared within a subclass?&lt;br /&gt;&lt;br /&gt;Sure. A private field or method or inner class belongs to its declared class and hides from its subclasses.&lt;br /&gt;There is no way for private stuff to have a runtime overloading or overriding (polymorphism) features.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q4. What is the default value of an object reference declared as an instance variable?&lt;br /&gt;&lt;br /&gt;null unless we define it explicitly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q5. What is the difference between a constructor and a method?&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;How can a subclass call a method or a constructor defined in a superclass?&lt;br /&gt;&lt;br /&gt;A constructor is a member function of a class that is used to create objects of that class, invoked using the new operator. It has the same name as the class and has no return type. They are only called once, whereas member functions can be called many times. A method is an ordinary member function of a class. It has its own name, a return type (which may be void), and is invoked using the dot operator. Constructor will be automatically invoked when an object is created whereas method has to be called explicitly.&lt;br /&gt;&lt;br /&gt;super.method(); is used to call a super class method from a sub class. To call a constructor of the super class, we use the super(); statement as the first line of the subclass’s constructor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q6. Can a top-level class be private or protected?&lt;br /&gt;&lt;br /&gt;No. A top-level class cannot be private or protected. It can have either "public" or no modifier. If it does not have a modifier it is supposed to have a default access. If a top level class is declared as private/protected the compiler will complain that the "modifier private is not allowed here”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q7. Why Java does not support multiple inheritance?&lt;br /&gt;&lt;br /&gt;Java does support multiple inheritance via interface implementation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q8. Where and how can you use a private constructor?&lt;br /&gt;&lt;br /&gt;Private constructor can be used if you do not want any other class to instantiate the class. This concept is generally used in Singleton Design Pattern. The instantiation of such classes is done from a static public method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q9. How are this() and super() used with constructors?&lt;br /&gt;&lt;br /&gt;this() is used to invoke a constructor of the same class. super() is used to invoke a superclass constructor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q10. What is Method Overriding? What restrictions are placed on method overriding?&lt;br /&gt;&lt;br /&gt;When a class defines a method using the same name, return type, and argument list as that of a method in its superclass, the method in the subclass is said to override the method present in the Superclass. When the method is invoked for an object of the&lt;br /&gt;class, it is the new definition of the method that is called, and not the method definition from superclass.&lt;br /&gt;Restrictions placed on method overriding&lt;br /&gt;• Overridden methods must have the same name, argument list, and return type.&lt;br /&gt;• The overriding method may not limit the access of the method it overrides. Methods may be overridden to be more public, not more private.&lt;br /&gt;• The overriding method may not throw any exceptions that may not be thrown by the overridden method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q11. What are the Object and Class classes used for? Which class should you use to obtain design information about an object?&lt;br /&gt;&lt;br /&gt;Differentiate between a Class and an Object?&lt;br /&gt;&lt;br /&gt;The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program. The Class class is used to obtain information about an object's design. A Class is only a definition or prototype of real life object. Whereas an object is an instance or living representation of real life object. Every object belongs to a class and every class contains one or more related objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q12. What is a singleton class?&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q13. What is singleton pattern?&lt;br /&gt;&lt;br /&gt;This design pattern is used by an application to ensure that at any time there is only one instance of a class created. You can achieve this by having the private constructor in the class and having a getter method which returns an object of the class and creates one for the first time if its null.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q14. What is method overloading and method overriding?&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;&lt;br /&gt;What is difference between overloading and overriding?&lt;br /&gt;&lt;br /&gt;Method overloading: When 2 or more methods in a class have the same method names with different arguments, it is said to be method overloading. Overloading does not block inheritance from the superclass. Overloaded methods must have different method signatures&lt;br /&gt;&lt;br /&gt;Method overriding : When a method in a class has the same method name with same arguments as that of the superclass,&lt;br /&gt;it is said to be method overriding. Overriding blocks inheritance from the superclass. Overridden methods must have same signature.&lt;br /&gt;&lt;br /&gt;Basically overloading and overriding are different aspects of polymorphism.&lt;br /&gt;&lt;br /&gt;static/early binding polymorphism: overloading&lt;br /&gt;dynamic/late binding polymorphism: overriding&lt;br /&gt;&lt;br /&gt;If a class is declared without any access modifiers, where may the class be accessed?&lt;br /&gt;&lt;br /&gt;A class that is declared without any access modifiers is said to have package or default access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q15. Does a class inherit the constructors of its superclass?&lt;br /&gt;&lt;br /&gt;A class does not inherit constructors from any of its super classes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q16. Which java.util classes and interfaces support event handling?&lt;br /&gt;&lt;br /&gt;The EventObject class and the EventListener interface support event processing&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q17. Can an object's finalize() method be invoked while it is reachable?&lt;br /&gt;&lt;br /&gt;An object's finalize() method cannot be invoked by the garbage collector while the object is still reachable. However, an object's finalize() method may be invoked by other objects.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q18. What is the purpose of the Runtime class?&lt;br /&gt;&lt;br /&gt;The purpose of the Runtime class is to provide access to the Java runtime system.&lt;br /&gt;&lt;br /&gt;It returns the runtime information like memory availability.&lt;br /&gt;&lt;br /&gt;* Runtime.freeMemory() --&gt; Returns JVM Free Memory&lt;br /&gt;* Runtime.maxMemory() --&gt; Returns the maximum amount of memory that the JVM will attempt to use. It also helps to run the garbage collector&lt;br /&gt;* Runtime.gc()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q19. What is the purpose of the System class?&lt;br /&gt;&lt;br /&gt;The purpose of the System class is to provide access to system resources.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q20. Can an unreachable object become reachable again?&lt;br /&gt;&lt;br /&gt;An unreachable object may become reachable again. This can happen when the object's finalize() method is invoked and the object performs an operation which causes it to become accessible to reachable object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q21. What is a bean? Where can it be used?&lt;br /&gt;&lt;br /&gt;A Bean is a reusable and self-contained software component. Beans created using java take advantage of all the security and platform independent features of java. Bean can be plugged into any software application. Bean is a simple class which has set and get methods. It could be used within a JSP using JSP tags to use them.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q22. What is the functionality of instanceOf() ?&lt;br /&gt;instanceOf opertaor is used to check whether an object can be cast to a specific type without throwing ClassCastException.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q23. What would happen if you say this = null?&lt;br /&gt;&lt;br /&gt;It will come up with Error Message&lt;br /&gt;&lt;br /&gt;"The left-hand side of an assignment must be a variable".&lt;br /&gt;&lt;br /&gt;I want to create two instances of a class ,But when trying for creating third instance it should not allow me to create . What i have to do for making this?&lt;br /&gt;&lt;br /&gt;One way of doing this would be:&lt;br /&gt;&lt;br /&gt;public class test1&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;static int cntr=0;&lt;br /&gt;&lt;br /&gt;test1()&lt;br /&gt;&lt;br /&gt;{ cntr++;&lt;br /&gt;&lt;br /&gt;if(cntr&gt;2)&lt;br /&gt;&lt;br /&gt;throw new NullPointerException();//u can define a new exception // for this&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public static void main(String args[])&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;test1 t1= new test1();&lt;br /&gt;&lt;br /&gt;System.out.println("hello 1");&lt;br /&gt;&lt;br /&gt;test1 t2= new test1();&lt;br /&gt;&lt;br /&gt;System.out.println("hello 2");&lt;br /&gt;&lt;br /&gt;test1 t3= new test1();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q24. What is the difference between an object and an instance?&lt;br /&gt;&lt;br /&gt;An Object May not have a class definition. eg int a[] where a is an array.&lt;br /&gt;&lt;br /&gt;An Instance should have a class definition.&lt;br /&gt;&lt;br /&gt;eg MyClass my=new MyClass();&lt;br /&gt;&lt;br /&gt;my is an instance.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q25. What is heap in Java?&lt;br /&gt;&lt;br /&gt;It is a memory area which stores all the objects created by an executing program.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q26. Why default constructor of base class will be called first in java?&lt;br /&gt;&lt;br /&gt;A subclass inherits all the methods and fields (eligible one) from the base class, so base class is constructed in the process of creation of subclass object (subclass is also an object of superclass). Hence before initializing the default value of sub class the super class should be initialized using the default constructor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q27. What are the other ways to create an object other than creating as new object?&lt;br /&gt;&lt;br /&gt;We can create object in different ways;&lt;br /&gt;&lt;br /&gt;1.new operator&lt;br /&gt;&lt;br /&gt;2.class.forName: Classname obj = Class.forName("Fully Qualified class Name").newInstance();&lt;br /&gt;&lt;br /&gt;3.newInstance&lt;br /&gt;&lt;br /&gt;4.object.clone&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Q28. What is the difference between instance, object, reference and a class?&lt;br /&gt;&lt;br /&gt;Class: A class is a user defined data type with set of data members &amp; member functions&lt;br /&gt;&lt;br /&gt;Object: An Object is an instance of a class&lt;br /&gt;&lt;br /&gt;Reference: A reference is just like a pointer pointing to an object&lt;br /&gt;&lt;br /&gt;Instance: This represents the values of data members of a class at a particular time&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-1217691884309616343?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BjaMz6ONCpmlAYdLmUeEuzXFUmo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BjaMz6ONCpmlAYdLmUeEuzXFUmo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BjaMz6ONCpmlAYdLmUeEuzXFUmo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BjaMz6ONCpmlAYdLmUeEuzXFUmo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/hJh5N3CA9hQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/1217691884309616343/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/06/java-classes-and-objects-interview.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/1217691884309616343?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/1217691884309616343?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/hJh5N3CA9hQ/java-classes-and-objects-interview.html" title="Java Classes and Objects Interview Questions" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/06/java-classes-and-objects-interview.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYAQnc9fSp7ImA9WhZVEUg.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-9006599568782571884</id><published>2011-05-23T04:22:00.000-07:00</published><updated>2011-05-23T04:29:03.965-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:29:03.965-07:00</app:edited><title>Objectives Questions on Java Language Fundamentals</title><content type="html">Questions on Language Fundamentals&lt;br /&gt;&lt;br /&gt;1. Which of these are legal identifiers. Select all the correct answers. &lt;br /&gt;A. number_1 &lt;br /&gt;B. number_a &lt;br /&gt;C. $1234 &lt;br /&gt;D. -volatile &lt;br /&gt;&lt;br /&gt;2. Which of these are not legal identifiers. Select all the correct answers. &lt;br /&gt;A. 1alpha &lt;br /&gt;B. _abcd &lt;br /&gt;C. xy+abc &lt;br /&gt;D. transient &lt;br /&gt;E. account-num &lt;br /&gt;F. very_long_name &lt;br /&gt;&lt;br /&gt;3. Which of the following are keywords in Java. Select all the correct answers. &lt;br /&gt;A. friend &lt;br /&gt;B. NULL &lt;br /&gt;C. implement &lt;br /&gt;D. synchronized &lt;br /&gt;E. throws &lt;br /&gt;&lt;br /&gt;4. Which of the following are Java keywords. Select all the correct answers. &lt;br /&gt;A. super &lt;br /&gt;B. strictfp &lt;br /&gt;C. void &lt;br /&gt;D. synchronize &lt;br /&gt;E. instanceof &lt;br /&gt;&lt;br /&gt;5. Which of these are Java keywords. Select all the correct answers &lt;br /&gt;A. TRUE &lt;br /&gt;B. volatile &lt;br /&gt;C. transient &lt;br /&gt;D. native &lt;br /&gt;E. interface &lt;br /&gt;F. then &lt;br /&gt;G. new&lt;br /&gt;&lt;br /&gt;6. Using up to four characters, write the Java representation of octal literal 6. &lt;br /&gt;&lt;br /&gt;7. Using up to four characters, write the Java representation of integer literal 3 in hexadecimal. &lt;br /&gt;&lt;br /&gt;8. Using up to four characters, write the Java representation of integer literal 10 in hexadecimal. &lt;br /&gt;&lt;br /&gt;9. What is the minimum value of char type. Select the one correct answer. &lt;br /&gt;A. 0 &lt;br /&gt;B. -215 &lt;br /&gt;C. -28 &lt;br /&gt;D. -215 - 1 &lt;br /&gt;E. -216 &lt;br /&gt;F. -216 - 1 &lt;br /&gt;&lt;br /&gt;10. How many bytes are used to represent the primitive data type int in Java. Select the one correct answer. &lt;br /&gt;A. 2 &lt;br /&gt;B. 4 &lt;br /&gt;C. 8 &lt;br /&gt;D. 1 &lt;br /&gt;E. The number of bytes to represent an int is compiler dependent. &lt;br /&gt;&lt;br /&gt;11. What is the legal range of values for a variable declared as a byte. Select the one correct answer. &lt;br /&gt;A. 0 to 256 &lt;br /&gt;B. 0 to 255 &lt;br /&gt;C. -128 to 127 &lt;br /&gt;D. -128 to 128 &lt;br /&gt;E. -127 to 128 &lt;br /&gt;F. -215 to 215 - 1 &lt;br /&gt;&lt;br /&gt;12. The width in bits of double primitive type in Java is --. Select the one correct answer. &lt;br /&gt;A. The width of double is platform dependent &lt;br /&gt;B. 64 &lt;br /&gt;C. 128 &lt;br /&gt;D. 8 &lt;br /&gt;E. 4 &lt;br /&gt;&lt;br /&gt;13. What would happen when the following is compiled and executed. Select the one correct answer. &lt;br /&gt;&lt;br /&gt;14. &lt;br /&gt;&lt;br /&gt;public class Compare { &lt;br /&gt; public static void main(String args[]) {&lt;br /&gt;  int x = 10, y;&lt;br /&gt;  if(x &lt; 10) &lt;br /&gt;   y = 1;&lt;br /&gt;   if(x&gt;= 10) y = 2;&lt;br /&gt;   System.out.println("y is " + y);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;A. The program compiles and prints y is 0 when executed. &lt;br /&gt;B. The program compiles and prints y is 1 when executed. &lt;br /&gt;C. The program compiles and prints y is 2 when executed. &lt;br /&gt;D. The program does not compile complaining about y not being initialized. &lt;br /&gt;E. The program throws a runtime exception.&lt;br /&gt;&lt;br /&gt;15. What would happen when the following is compiled and executed. Select the one correct answer. &lt;br /&gt;&lt;br /&gt; class example {&lt;br /&gt;  int x;&lt;br /&gt;  int y;&lt;br /&gt;  String name;&lt;br /&gt;  public static void main(String args[]) {&lt;br /&gt;   example pnt = new example();&lt;br /&gt;    " " + pnt.x + " " + pnt.y);  &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;A. The program does not compile because x, y and name are not initialized. &lt;br /&gt;B. The program throws a runtime exception as x, y, and name are used before initialization. &lt;br /&gt;C. The program prints pnt is 0 0. &lt;br /&gt;D. The program prints pnt is null 0 0. &lt;br /&gt;E. The program prints pnt is NULL false false    &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Answers to questions on Language Fundamentals &lt;br /&gt;1. a, b, c &lt;br /&gt;2. a, c, d, e &lt;br /&gt;3. d, e &lt;br /&gt;4. a, b, c, e &lt;br /&gt;5. b, c, d, e, g &lt;br /&gt;6. Any of the following are correct answers - 06, 006, or 0006 &lt;br /&gt;7. Any of the following are correct answers - 0x03, 0X03, 0X3 or 0x3 &lt;br /&gt;8. Any of the following are correct answers - 0x0a, 0X0a, 0Xa, 0xa, 0x0A, 0X0A, 0XA, 0xA &lt;br /&gt;9. a &lt;br /&gt;10. b &lt;br /&gt;11. c &lt;br /&gt;12. b &lt;br /&gt;13. d. The variable y is getting read before being properly initialized. &lt;br /&gt;14. d. Instance variable of type int and String are initialized to 0 and NULL respectively. &lt;br /&gt;15. a&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-9006599568782571884?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OqemVl_Ma6K3PTCRcnRJ1QdhrbU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OqemVl_Ma6K3PTCRcnRJ1QdhrbU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OqemVl_Ma6K3PTCRcnRJ1QdhrbU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OqemVl_Ma6K3PTCRcnRJ1QdhrbU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/cv1tTBYwa2U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/9006599568782571884/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/objectives-questions-on-java-language.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/9006599568782571884?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/9006599568782571884?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/cv1tTBYwa2U/objectives-questions-on-java-language.html" title="Objectives Questions on Java Language Fundamentals" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/objectives-questions-on-java-language.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ENQnw-cCp7ImA9WhZVEUk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-6315177126644442656</id><published>2011-05-23T04:21:00.001-07:00</published><updated>2011-05-23T04:21:33.258-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:21:33.258-07:00</app:edited><title>Basic Structure of PL/SQL: ORACLE</title><content type="html">Basic Structure of PL/SQL:&lt;br /&gt; 1. PL/SQL stands for Procedural Language/SQL.&lt;br /&gt; 2. The basic unit in PL/SQL is a block.&lt;br /&gt; 3. A block that has following basic structure:&lt;br /&gt; &lt;br /&gt;  DECLARE&lt;br /&gt;      /* Declarative section: variables, types, and local subprograms. */&lt;br /&gt;&lt;br /&gt;  BEGIN&lt;br /&gt;      /* Executable section: procedural and SQL statements go here. */&lt;br /&gt;      /* This is the only section of the block that is required. */&lt;br /&gt;&lt;br /&gt;       EXCEPTION&lt;br /&gt;      /* Exception handling section: error handling statements go here. */&lt;br /&gt; &lt;br /&gt;  END;&lt;br /&gt;&lt;br /&gt; Note: Only the executable section is required. The other sections are optional.&lt;br /&gt; &lt;br /&gt; 4. Data manipulation statements plus some transaction control are allowed.&lt;br /&gt;&lt;br /&gt; 5. Data definition statements like CREATE, DROP, or ALTER are not allowed.&lt;br /&gt;&lt;br /&gt; 6. The executable section also contains constructs such as assignments, branches, loops, procedure calls, and triggers.&lt;br /&gt;&lt;br /&gt; 7. C style comments are allowed like /* ....... */&lt;br /&gt;&lt;br /&gt; 8. To execute a PL/SQL program, we must follow the program text itself by&lt;br /&gt;&lt;br /&gt;      A line with a single dot ("."), and then&lt;br /&gt;      A line with run;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Variables and Types in ORACLE:&lt;br /&gt; 1. Information is transmitted between a PL/SQL program and the database through variables.&lt;br /&gt;&lt;br /&gt; 2. Followings are the data types:&lt;br /&gt;  a. One of the types used by SQL for database columns&lt;br /&gt;  b. A generic type used in PL/SQL such as NUMBER&lt;br /&gt;  c. Declared to be the same as the type of some database column&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Control Flow in PL/SQL&lt;br /&gt; 1. PL/SQL allows you to branch and create loops in a fairly familiar way.&lt;br /&gt;&lt;br /&gt; 2. An IF statement looks like:&lt;br /&gt;&lt;br /&gt;  a. IF &lt;condition&gt; THEN &lt;statement_list&gt; ELSE &lt;statement_list&gt; END IF;&lt;br /&gt;&lt;br /&gt;  b. The ELSE part is optional. If you want a multiway branch, use:&lt;br /&gt;&lt;br /&gt;  c. IF &lt;condition_1&gt; THEN ...&lt;br /&gt;&lt;br /&gt;        ELSIF &lt;condition_2&gt; THEN ...&lt;br /&gt;   ... ...&lt;br /&gt;        ELSIF &lt;condition_n&gt; THEN ...&lt;br /&gt;        ELSE ...&lt;br /&gt;&lt;br /&gt;        END IF;&lt;br /&gt;&lt;br /&gt; 3. Loops are created with the following:&lt;br /&gt;&lt;br /&gt;  LOOP&lt;br /&gt;&lt;br /&gt;       &lt;loop_body&gt; /* A list of statements. */&lt;br /&gt;&lt;br /&gt;  END LOOP;&lt;br /&gt;&lt;br /&gt; 4.  A WHILE loop can be formed with&lt;br /&gt;&lt;br /&gt;      WHILE &lt;condition&gt; LOOP&lt;br /&gt;&lt;br /&gt;          &lt;loop_body&gt;&lt;br /&gt;&lt;br /&gt;      END LOOP;&lt;br /&gt;&lt;br /&gt; 5. A simple FOR loop can be formed with:&lt;br /&gt;&lt;br /&gt;      FOR &lt;var&gt; IN &lt;start&gt;..&lt;finish&gt; LOOP&lt;br /&gt;&lt;br /&gt;          &lt;loop_body&gt;&lt;br /&gt;&lt;br /&gt;       END LOOP;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-6315177126644442656?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uCrY1hjDLRQK54A_ySWSW7BEa8g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uCrY1hjDLRQK54A_ySWSW7BEa8g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uCrY1hjDLRQK54A_ySWSW7BEa8g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uCrY1hjDLRQK54A_ySWSW7BEa8g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/ytGjlsPDAqc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/6315177126644442656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/basic-structure-of-plsql-oracle.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/6315177126644442656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/6315177126644442656?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/ytGjlsPDAqc/basic-structure-of-plsql-oracle.html" title="Basic Structure of PL/SQL: ORACLE" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/basic-structure-of-plsql-oracle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EHR3o8fCp7ImA9WhZVEUk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-8495317116363210656</id><published>2011-05-23T04:20:00.001-07:00</published><updated>2011-05-23T04:20:36.474-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:20:36.474-07:00</app:edited><title>How to create the view in ORACLE ?</title><content type="html">Answer: create  or replace view e23_view as select e2.reg,e2.name,e3.address from e2,e3 where e2.reg = e3.reg;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-8495317116363210656?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xaFSJnQrKiMgtuYSUxMb8oZ2YHU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xaFSJnQrKiMgtuYSUxMb8oZ2YHU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xaFSJnQrKiMgtuYSUxMb8oZ2YHU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xaFSJnQrKiMgtuYSUxMb8oZ2YHU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/NXM1z7AuDRY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/8495317116363210656/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/how-to-create-view-in-oracle.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/8495317116363210656?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/8495317116363210656?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/NXM1z7AuDRY/how-to-create-view-in-oracle.html" title="How to create the view in ORACLE ?" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/how-to-create-view-in-oracle.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EFRXY9cSp7ImA9WhZVEUk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-7395249659184347737</id><published>2011-05-23T04:19:00.000-07:00</published><updated>2011-05-23T04:20:14.869-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:20:14.869-07:00</app:edited><title>How to find the 2nd, 3rd...nth heighest record in the table?</title><content type="html">Answer: select ev1.* from e23_view ev1 where (&amp;N-1) = (Select count(distinct(ev2.Reg)) from e23_view ev2 where ev1.reg &lt; ev2.reg);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-7395249659184347737?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Rky7BWnOxmk5c6zj6D4JLT-u_I4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rky7BWnOxmk5c6zj6D4JLT-u_I4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Rky7BWnOxmk5c6zj6D4JLT-u_I4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Rky7BWnOxmk5c6zj6D4JLT-u_I4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/YUU4adK7S2g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/7395249659184347737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/how-to-find-2nd-3rdnth-heighest-record.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7395249659184347737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7395249659184347737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/YUU4adK7S2g/how-to-find-2nd-3rdnth-heighest-record.html" title="How to find the 2nd, 3rd...nth heighest record in the table?" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/how-to-find-2nd-3rdnth-heighest-record.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IDQno7eip7ImA9WhZVEUk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-2166099413938319776</id><published>2011-05-23T04:18:00.000-07:00</published><updated>2011-05-23T04:19:33.402-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:19:33.402-07:00</app:edited><title>ORACLE : How To get primary key of Table in ORACLE</title><content type="html">SQL Queries: select ALL_CONSTRAINTS.column_name  from ALL_CONSTRAINTS where CONSTRAINT_TYPE = 'P' and TABLE_NAME = 'CONTRACT'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-2166099413938319776?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N6aUFz0mCnAsOm9cOwu0oT8rszg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N6aUFz0mCnAsOm9cOwu0oT8rszg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N6aUFz0mCnAsOm9cOwu0oT8rszg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N6aUFz0mCnAsOm9cOwu0oT8rszg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/s9FtdSlvQl4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/2166099413938319776/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/oracle-how-to-get-primary-key-of-table.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2166099413938319776?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2166099413938319776?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/s9FtdSlvQl4/oracle-how-to-get-primary-key-of-table.html" title="ORACLE : How To get primary key of Table in ORACLE" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/oracle-how-to-get-primary-key-of-table.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MDRX8-fip7ImA9WhZVEUk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-4815555623680123533</id><published>2011-05-23T04:17:00.001-07:00</published><updated>2011-05-23T04:17:54.156-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:17:54.156-07:00</app:edited><title>ORACLE : How To get Number of column of Table in ORACLE</title><content type="html">Use the Table: "DBA_TAB_COLUMNS"&lt;br /&gt;&lt;br /&gt;For Understanding: DESC DBA_TAB_COLUMNS&lt;br /&gt;&lt;br /&gt;SQL Queries: select count(column_name) from dba_tab_columns where Upper(table_name) = upper('table_name');&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-4815555623680123533?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_MuhwFnXoRT5bCJywFz8RH5BYsI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_MuhwFnXoRT5bCJywFz8RH5BYsI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/_MuhwFnXoRT5bCJywFz8RH5BYsI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_MuhwFnXoRT5bCJywFz8RH5BYsI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/02f1FrLSed0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/4815555623680123533/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/oracle-how-to-get-number-of-column-of.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/4815555623680123533?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/4815555623680123533?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/02f1FrLSed0/oracle-how-to-get-number-of-column-of.html" title="ORACLE : How To get Number of column of Table in ORACLE" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/oracle-how-to-get-number-of-column-of.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QCSXcyeyp7ImA9WhZVEUk.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-8504115252607821709</id><published>2011-05-23T04:14:00.000-07:00</published><updated>2011-05-23T04:16:08.993-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-23T04:16:08.993-07:00</app:edited><title>Introductions of Servlet: Java</title><content type="html">1. What is Servlet ?&lt;br /&gt;&lt;br /&gt;* A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model.  For example: Java Servlet technology defines HTTP-specific servlet classes. &lt;br /&gt;&lt;br /&gt;* The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing servlets. All servlets must implement the Servlet interface, which defines life-cycle methods. &lt;br /&gt;&lt;br /&gt;* When implementing a generic service, you can use or extend the GenericServlet class provided with the Java Servlet API. The HttpServlet class provides methods, such as doGet and doPost, for handling HTTP-specific services. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. Servlet Life-cycle:&lt;br /&gt;&lt;br /&gt;Each servlet has same life-cycle:&lt;br /&gt;* A server loads and initializes the servlet &lt;br /&gt;* The servlet handles zero or more client requests &lt;br /&gt;* The server removes the servlet &lt;br /&gt;&lt;br /&gt;Details of Life-cycle:&lt;br /&gt;&lt;br /&gt;* Loading and Inatantiation:&lt;br /&gt;              The servlet container loads the servlet during startup or when the first request is made. The loading of the servlet depends on the attribute &lt;load-on-startup&gt; of web.xml file. If the attribute &lt;load-on-startup&gt; has a positive value then the servlet is load with loading of the container otherwise it load when the first request comes for service. After loading of the servlet, the container creates the instances of the servlet. &lt;br /&gt; &lt;br /&gt;*Initialization: &lt;br /&gt;  After creating the instances, the servlet container calls the init() method and passes the servlet initialization parameters to the init() method. The init() must be called by the servlet container before the servlet can service any request. The initialization parameters persist untill the servlet is destroyed. The init() method is called only once throughout the life cycle of the servlet. &lt;br /&gt;The servlet will be available for service if it is loaded successfully otherwise the servlet container unloads the servlet. &lt;br /&gt;&lt;br /&gt;*Servicing the Request: &lt;br /&gt;                After successfully completing the initialization process, the servlet will be available for service. Servlet creates seperate threads for each request. The sevlet container calls the service() method for servicing any request. The service() method determines the kind of request and calls the appropriate method (doGet() or doPost()) for handling the request and sends response to the client using the methods of the response object.&lt;br /&gt;&lt;br /&gt;*Destroying the Servlet: &lt;br /&gt;                If the servlet is no longer needed for servicing any request, the servlet container calls the destroy() method . Like the init() method this method is also called only once throughout the life cycle of the servlet. Calling the destroy() method indicates to the servlet container not to sent the any request for service and the servlet  releases all the resources associated with it. Java Virtual Machine claims for the memory associated with the resources for garbage collection.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-8504115252607821709?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/82ytWgMAo0xT_R2ubaY5k_HVghM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/82ytWgMAo0xT_R2ubaY5k_HVghM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/82ytWgMAo0xT_R2ubaY5k_HVghM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/82ytWgMAo0xT_R2ubaY5k_HVghM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/5tgbiIYi3s0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/8504115252607821709/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/05/introductions-of-servlet-java.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/8504115252607821709?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/8504115252607821709?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/5tgbiIYi3s0/introductions-of-servlet-java.html" title="Introductions of Servlet: Java" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/05/introductions-of-servlet-java.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0AFSHs5eCp7ImA9WhZQEkQ.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-3560262825273252502</id><published>2011-04-20T03:31:00.000-07:00</published><updated>2011-04-20T03:35:19.520-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-20T03:35:19.520-07:00</app:edited><title>TextListener,FocusListener,ActionListener,KeyListener, MouseListener,MouseMotionListener: Event Handling; Java Swing</title><content type="html">Interface TextListener:&lt;br /&gt;&lt;br /&gt;package java.awt.event;&lt;br /&gt;&lt;br /&gt;1. The listener interface for receiving text events.&lt;br /&gt;2. The class that is interested in processing a text event implements this interface. The object created with that class is then registered with a component using the component's “addTextListener” method. When the component's text changes, the listener object's “textValueChanged” method is invoked.&lt;br /&gt;&lt;br /&gt;3. Invoked when the value of the text has changed. The code written for this method performs the operations that need to occur when text changes.&lt;br /&gt;    public void textValueChanged(TextEvent e);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;____________________________________________________________________________________&lt;br /&gt;Interface FocusListener:&lt;br /&gt;&lt;br /&gt;package java.awt.event;&lt;br /&gt;&lt;br /&gt;1. The listener interface for receiving keyboard focus events on a component.&lt;br /&gt;&lt;br /&gt;2. The class that is interested in processing a focus event either implements this interface (and all the methods it contains) or extends the abstract “FocusAdapter” class (overriding only the methods of interest).&lt;br /&gt;&lt;br /&gt;3. The listener object created from that class is then registered with a component using the component's “addFocusListener” method. When the component gains or loses the keyboard focus, the relevant method in the listener object is invoked, and the “FocusEvent” is passed to it.&lt;br /&gt;&lt;br /&gt;4. Invoked when a component gains the keyboard focus.&lt;br /&gt;    public void focusGained(FocusEvent e);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Invoked when a component loses the keyboard focus.&lt;br /&gt;    public void focusLost(FocusEvent e);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_____________________________________________________________________________________&lt;br /&gt;Interface ActionListener:&lt;br /&gt;&lt;br /&gt;package java.awt.event;&lt;br /&gt;&lt;br /&gt;1.The listener interface for receiving action events. &lt;br /&gt;&lt;br /&gt;2. The class that is interested in processing an action event implements this interface, and the object created with that class is registered with a component, using the component's “addActionListener” method.&lt;br /&gt;&lt;br /&gt;3. When the action event occurs, that object's “actionPerformed” method is invoked.&lt;br /&gt;&lt;br /&gt;4. Invoked when an action occurs.&lt;br /&gt;    public void actionPerformed(ActionEvent e);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;____________________________________________________________________________________&lt;br /&gt;Interface KeyListener:&lt;br /&gt;&lt;br /&gt;package java.awt.event.*;&lt;br /&gt;&lt;br /&gt;1. This interface is for receiving the Keystrokes.&lt;br /&gt;2. The class which are interested in processing the keyboard events then has to implements the KeyListener interface or extends the abstract KeyAdapter class.&lt;br /&gt;3. The listener object created from that class is then registered with a component using the component's addKeyListener method. &lt;br /&gt;4. A keyboard event is generated when a key is pressed, released, or typed (pressedn and released). &lt;br /&gt;5. he relevant method in the listener object is then invoked, and the KeyEvent is passed to it. Those are followings:&lt;br /&gt; * public void keyTyped(KeyEvent e): Invoked when a key has been typed &lt;br /&gt; * public void keyPressed(KeyEvent e): Invoked when a key has been pressed. &lt;br /&gt; * public void keyReleased(KeyEvent e): Invoked when a key has been released. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;____________________________________________________________________________________&lt;br /&gt;Interface  MouseListener:&lt;br /&gt;&lt;br /&gt;package java.awt.event.*;&lt;br /&gt;&lt;br /&gt;1. The listener interface for receiving "interesting" mouse events (press, release, click, enter, and exit) on a component.&lt;br /&gt;2. To track mouse moves and mouse drags, use the “MouseMotionListener”.&lt;br /&gt;&lt;br /&gt;3. The class that is interested in processing a mouse event either implements this interface (and all the methods it contains) or extends the abstract “MouseAdapter” class (overriding only the methods of interest).&lt;br /&gt;&lt;br /&gt;4. The listener object created from that class is then registered with a component using the component's “addMouseListener” method. A mouse event is generated when the mouse is pressed, released clicked (pressed and released). A mouse event is also generated when the mouse cursor enters or leaves a component. When a mouse event occurs, the relevant method in the listener object is invoked, and the “MouseEvent” is passed to it.&lt;br /&gt;&lt;br /&gt;5. public interface MouseListener extends EventListener {}&lt;br /&gt;6. public void mouseClicked(MouseEvent e);&lt;br /&gt;Invoked when the mouse button has been clicked (pressed and released) on a component.&lt;br /&gt;&lt;br /&gt;7.public void mousePressed(MouseEvent e);&lt;br /&gt;Invoked when a mouse button has been pressed on a component.&lt;br /&gt;&lt;br /&gt;8.public void mouseReleased(MouseEvent e);&lt;br /&gt;Invoked when a mouse button has been released on a component.&lt;br /&gt;&lt;br /&gt;9.public void mouseEntered(MouseEvent e);&lt;br /&gt;Invoked when the mouse enters a component.&lt;br /&gt;&lt;br /&gt;10.public void mouseExited(MouseEvent e);&lt;br /&gt;Invoked when the mouse exits a component.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;____________________________________________________________________________________&lt;br /&gt;&lt;br /&gt;Interface  MouseMotionListener:&lt;br /&gt;&lt;br /&gt;package java.awt.event.*;&lt;br /&gt;&lt;br /&gt;1. The  MouseMotionListener interface for receiving mouse motion events on a component.&lt;br /&gt;2. For clicks and other mouse events, use the “MouseListener”&lt;br /&gt;&lt;br /&gt;3. The class that is interested in processing a mouse motion event either implements this interface (and all the methods it contains) or extends the abstract “MouseMotionAdapter” class (overriding only the methods of interest).&lt;br /&gt;&lt;br /&gt;4. The listener object created from that class is then registered with a component using the component's “addMouseMotionListener” method. A mouse motion event is generated when the mouse is moved or dragged. (Many such events will be generated). When a mouse motion event occurs, the relevant method in the listener object is invoked, and the “MouseEvent” is passed to it.&lt;br /&gt;&lt;br /&gt;5. public interface MouseMotionListener extends EventListener {}&lt;br /&gt;&lt;br /&gt;6. public void mouseDragged(MouseEvent e);&lt;br /&gt;&lt;br /&gt;Invoked when a mouse button is pressed on a component and then dragged.  “MOUSE_DRAGGED” events will continue to be delivered to the component where the drag originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component). Due to platform-dependent Drag&amp;Drop implementations, “MOUSE_DRAGGED” events may not be delivered during a native Drag&amp;Drop operation. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. public void mouseMoved(MouseEvent e);&lt;br /&gt;&lt;br /&gt;Invoked when the mouse cursor has been moved onto a component but no buttons have been pushed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-3560262825273252502?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Mv3EUaqG9SZydLrQKd46pWKegvU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Mv3EUaqG9SZydLrQKd46pWKegvU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Mv3EUaqG9SZydLrQKd46pWKegvU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Mv3EUaqG9SZydLrQKd46pWKegvU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/MtFlFHbGNC8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/3560262825273252502/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/04/textlistenerfocuslisteneractionlistener.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/3560262825273252502?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/3560262825273252502?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/MtFlFHbGNC8/textlistenerfocuslisteneractionlistener.html" title="TextListener,FocusListener,ActionListener,KeyListener, MouseListener,MouseMotionListener: Event Handling; Java Swing" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/04/textlistenerfocuslisteneractionlistener.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMGSX47fCp7ImA9WhZRFU4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-7423287866612454501</id><published>2011-04-11T07:32:00.000-07:00</published><updated>2011-04-11T07:33:48.004-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-11T07:33:48.004-07:00</app:edited><title>JFileChooser: How to use JFileChooser in Java Swing</title><content type="html">javax.swing&lt;br /&gt;Class JFileChooser&lt;br /&gt;&lt;br /&gt;java.lang.Object&lt;br /&gt;  extended byjava.awt.Component&lt;br /&gt;      extended byjava.awt.Container&lt;br /&gt;          extended byjavax.swing.JComponent&lt;br /&gt;              extended byjavax.swing.JFileChooser&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JFileChooser provides a simple mechanism for the user to choose a file. For information about using JFileChooser:&lt;br /&gt;&lt;br /&gt;The following code pops up a file chooser for the user's home directory that sees only .jpg and .gif images:&lt;br /&gt;&lt;br /&gt;    JFileChooser chooser = new JFileChooser();&lt;br /&gt;&lt;br /&gt;Note: source for ExampleFileFilter can be found in FileChooserDemo, under the demo/jfc directory in the Java 2 SDK, Standard Edition.&lt;br /&gt;&lt;br /&gt;    ExampleFileFilter filter = new ExampleFileFilter();&lt;br /&gt;    filter.addExtension("jpg");&lt;br /&gt;    filter.addExtension("gif");&lt;br /&gt;    filter.setDescription("JPG &amp; GIF Images");&lt;br /&gt;&lt;br /&gt;    chooser.setFileFilter(filter);&lt;br /&gt;    int returnVal = chooser.showOpenDialog(parent);&lt;br /&gt;&lt;br /&gt;    if(returnVal == JFileChooser.APPROVE_OPTION) {&lt;br /&gt;       System.out.println("You chose to open this file: " +&lt;br /&gt;            chooser.getSelectedFile().getName());&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-7423287866612454501?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vhgpoTjuTP-bKzKS5j8sMvYW57M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vhgpoTjuTP-bKzKS5j8sMvYW57M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vhgpoTjuTP-bKzKS5j8sMvYW57M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vhgpoTjuTP-bKzKS5j8sMvYW57M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/yRta7r8XxPs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/7423287866612454501/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/04/jfilechooser-how-to-use-jfilechooser-in.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7423287866612454501?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/7423287866612454501?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/yRta7r8XxPs/jfilechooser-how-to-use-jfilechooser-in.html" title="JFileChooser: How to use JFileChooser in Java Swing" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>2</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/04/jfilechooser-how-to-use-jfilechooser-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEGQXo4cSp7ImA9WhZREkg.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-340120851374277781</id><published>2011-04-08T02:51:00.000-07:00</published><updated>2011-04-08T02:57:00.439-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-08T02:57:00.439-07:00</app:edited><title>JTable: How to create Table in Java Swing</title><content type="html">javax.swing &lt;br /&gt;Class JTable&lt;br /&gt;java.lang.Object&lt;br /&gt;  java.awt.Component&lt;br /&gt;      java.awt.Container&lt;br /&gt;          javax.swing.JComponent&lt;br /&gt;              javax.swing.JTable&lt;br /&gt;&lt;br /&gt;All Implemented Interfaces: &lt;br /&gt;Accessible, CellEditorListener, EventListener, ImageObserver, ListSelectionListener, MenuContainer, Scrollable, Serializable, TableColumnModelListener, TableModelListener &lt;br /&gt;&lt;br /&gt;public class JTable&lt;br /&gt;extends JComponent&lt;br /&gt;implements TableModelListener, Scrollable, TableColumnModelListener, ListSelectionListener, CellEditorListener, Accessible&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. The JTable is used to display and edit regular two-dimensional tables of cells. &lt;br /&gt;&lt;br /&gt;2. The JTable has many facilities that make it possible to customize its rendering and editing.&lt;br /&gt;&lt;br /&gt;3. For example, to set up a table with 10 rows and 10 columns of numbers:&lt;br /&gt;&lt;br /&gt;      TableModel dataModel = new AbstractTableModel() {&lt;br /&gt;          public int getColumnCount() { return 10; }&lt;br /&gt;          public int getRowCount() { return 10;}&lt;br /&gt;          public Object getValueAt(int row, int col) { return new Integer(row*col); }&lt;br /&gt;      };&lt;br /&gt;      JTable table = new JTable(dataModel);&lt;br /&gt;      JScrollPane scrollpane = new JScrollPane(table);&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;4. Note that if you wish to use a JTable in a standalone view (outside of a JScrollPane) and want the header displayed, you can get it using getTableHeader() and display it separately. &lt;br /&gt;&lt;br /&gt;5. The DefaultTableModel is a model implementation that uses a Vector of Vectors of Objects to store the cell values. As well as copying the data from an application into the DefaultTableModel.&lt;br /&gt;&lt;br /&gt;6. A good rule of thumb for deciding whether to use the AbstractTableModel or the DefaultTableModel is to use the AbstractTableModel as the base class for creating subclasses and the DefaultTableModel when subclassing is not required. &lt;br /&gt;&lt;br /&gt;7. The JTable simply takes a tabular range of cells and uses getValueAt(int, int) to retrieve the values from the model during painting.&lt;br /&gt;&lt;br /&gt;_____________________________________________________________________________________&lt;br /&gt;8. Field Summary&lt;br /&gt;static int&lt;br /&gt;AUTO_RESIZE_ALL_COLUMNS &lt;br /&gt;          During all resize operations, proportionately resize all columns.&lt;br /&gt;static int&lt;br /&gt;AUTO_RESIZE_LAST_COLUMN &lt;br /&gt;          During all resize operations, apply adjustments to the last column only.&lt;br /&gt;static int&lt;br /&gt;AUTO_RESIZE_NEXT_COLUMN &lt;br /&gt;          When a column is adjusted in the UI, adjust the next column the opposite way.&lt;br /&gt;static int&lt;br /&gt;AUTO_RESIZE_OFF &lt;br /&gt;          Do not adjust column widths automatically; use a scrollbar.&lt;br /&gt;static int&lt;br /&gt;AUTO_RESIZE_SUBSEQUENT_COLUMNS &lt;br /&gt;          During UI adjustment, change subsequent columns to preserve the total width; this is the default behavior.&lt;br /&gt;&lt;br /&gt;protected  boolean&lt;br /&gt;autoCreateColumnsFromModel &lt;br /&gt;          The table will query the TableModel to build the default set of columns if this is true.&lt;br /&gt;&lt;br /&gt;protected  int&lt;br /&gt;autoResizeMode &lt;br /&gt;          Determines if the table automatically resizes the width of the table's columns to take up the entire width of the table, and how it does the resizing.&lt;br /&gt;protected  TableCellEditor&lt;br /&gt;cellEditor &lt;br /&gt;          The object that overwrites the screen real estate occupied by the current cell and allows the user to change its contents.&lt;br /&gt;&lt;br /&gt;protected  boolean&lt;br /&gt;cellSelectionEnabled &lt;br /&gt;          Obsolete as of Java 2 platform v1.3.&lt;br /&gt;&lt;br /&gt;protected  TableColumnModel&lt;br /&gt;columnModel &lt;br /&gt;          The TableColumnModel of the table.&lt;br /&gt;&lt;br /&gt;protected  TableModel&lt;br /&gt;dataModel &lt;br /&gt;          The TableModel of the table.&lt;br /&gt;&lt;br /&gt;protected  Hashtable&lt;br /&gt;defaultEditorsByColumnClass &lt;br /&gt;          A table of objects that display and edit the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.&lt;br /&gt;&lt;br /&gt;protected  Hashtable&lt;br /&gt;defaultRenderersByColumnClass &lt;br /&gt;          A table of objects that display the contents of a cell, indexed by class as declared in getColumnClass in the TableModel interface.&lt;br /&gt;&lt;br /&gt;protected  int&lt;br /&gt;editingColumn &lt;br /&gt;          Identifies the column of the cell being edited.&lt;br /&gt;&lt;br /&gt;protected  int&lt;br /&gt;editingRow &lt;br /&gt;          Identifies the row of the cell being edited.&lt;br /&gt;&lt;br /&gt;protected  Component&lt;br /&gt;editorComp &lt;br /&gt;          If editing, the Component that is handling the editing.&lt;br /&gt;&lt;br /&gt;protected  Color&lt;br /&gt;gridColor &lt;br /&gt;          The color of the grid.&lt;br /&gt;&lt;br /&gt;protected  Dimension&lt;br /&gt;preferredViewportSize &lt;br /&gt;          Used by the Scrollable interface to determine the initial visible area.&lt;br /&gt;&lt;br /&gt;protected  int&lt;br /&gt;rowHeight &lt;br /&gt;          The height in pixels of each row in the table.&lt;br /&gt;&lt;br /&gt;protected  int&lt;br /&gt;rowMargin &lt;br /&gt;          The height in pixels of the margin between the cells in each row.&lt;br /&gt;&lt;br /&gt;protected  boolean&lt;br /&gt;rowSelectionAllowed &lt;br /&gt;          True if row selection is allowed in this table.&lt;br /&gt;&lt;br /&gt;protected  Color&lt;br /&gt;selectionBackground &lt;br /&gt;          The background color of selected cells.&lt;br /&gt;&lt;br /&gt;protected  Color&lt;br /&gt;selectionForeground &lt;br /&gt;          The foreground color of selected cells.&lt;br /&gt;&lt;br /&gt;protected  ListSelectionModel&lt;br /&gt;selectionModel &lt;br /&gt;          The ListSelectionModel of the table, used to keep track of row selections.&lt;br /&gt;&lt;br /&gt;protected  boolean&lt;br /&gt;showHorizontalLines &lt;br /&gt;          The table draws horizontal lines between cells if showHorizontalLines is true.&lt;br /&gt;&lt;br /&gt;protected  boolean&lt;br /&gt;showVerticalLines &lt;br /&gt;          The table draws vertical lines between cells if showVerticalLines is true.&lt;br /&gt;&lt;br /&gt;protected  JTableHeader&lt;br /&gt;tableHeader &lt;br /&gt;          The TableHeader working with the table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;_____________________________________________________________________________________&lt;br /&gt;9. Constructor Summary&lt;br /&gt;JTable() &lt;br /&gt;          Constructs a default JTable that is initialized with a default data model, a default column model, and a default selection model.&lt;br /&gt;&lt;br /&gt;JTable(int numRows, int numColumns) &lt;br /&gt;          Constructs a JTable with numRows and numColumns of empty cells using DefaultTableModel.&lt;br /&gt;&lt;br /&gt;JTable(Object[][] rowData, Object[] columnNames) &lt;br /&gt;          Constructs a JTable to display the values in the two dimensional array, rowData, with column names, columnNames.&lt;br /&gt;&lt;br /&gt;JTable(TableModel dm) &lt;br /&gt;          Constructs a JTable that is initialized with dm as the data model, a default column model, and a default selection model.&lt;br /&gt;&lt;br /&gt;JTable(TableModel dm, TableColumnModel cm) &lt;br /&gt;          Constructs a JTable that is initialized with dm as the data model, cm as the column model, and a default selection model.&lt;br /&gt;&lt;br /&gt;JTable(TableModel dm, TableColumnModel cm, ListSelectionModel sm) &lt;br /&gt;          Constructs a JTable that is initialized with dm as the data model, cm as the column model, and sm as the selection model.&lt;br /&gt;&lt;br /&gt;JTable(Vector rowData, Vector columnNames) &lt;br /&gt;          Constructs a JTable to display the values in the Vector of Vectors, rowData, with column names, columnNames.&lt;br /&gt;&lt;br /&gt;_____________________________________________________________________________________&lt;br /&gt;10. Method Summary&lt;br /&gt; void&lt;br /&gt;addColumn(TableColumn aColumn) &lt;br /&gt;          Appends aColumn to the end of the array of columns held by this JTable's column model.&lt;br /&gt; void&lt;br /&gt;addColumnSelectionInterval(int index0, int index1) &lt;br /&gt;          Adds the columns from index0 to index1, inclusive, to the current selection.&lt;br /&gt; void&lt;br /&gt;addNotify() &lt;br /&gt;          Calls the configureEnclosingScrollPane method.&lt;br /&gt; void&lt;br /&gt;addRowSelectionInterval(int index0, int index1) &lt;br /&gt;          Adds the rows from index0 to index1, inclusive, to the current selection.&lt;br /&gt; void&lt;br /&gt;changeSelection(int rowIndex, int columnIndex, boolean toggle, boolean extend) &lt;br /&gt;          Updates the selection models of the table, depending on the state of the two flags: toggle and extend.&lt;br /&gt; void&lt;br /&gt;clearSelection() &lt;br /&gt;          Deselects all selected columns and rows.&lt;br /&gt; void&lt;br /&gt;columnAdded(TableColumnModelEvent e) &lt;br /&gt;          Invoked when a column is added to the table column model.&lt;br /&gt; int&lt;br /&gt;columnAtPoint(Point point) &lt;br /&gt;          Returns the index of the column that point lies in, or -1 if the result is not in the range [0, getColumnCount()-1].&lt;br /&gt; void&lt;br /&gt;columnMarginChanged(ChangeEvent e) &lt;br /&gt;          Invoked when a column is moved due to a margin change.&lt;br /&gt; void&lt;br /&gt;columnMoved(TableColumnModelEvent e) &lt;br /&gt;          Invoked when a column is repositioned.&lt;br /&gt; void&lt;br /&gt;columnRemoved(TableColumnModelEvent e) &lt;br /&gt;          Invoked when a column is removed from the table column model.&lt;br /&gt; void&lt;br /&gt;columnSelectionChanged(ListSelectionEvent e) &lt;br /&gt;          Invoked when the selection model of the TableColumnModel is changed.&lt;br /&gt;protected  void&lt;br /&gt;configureEnclosingScrollPane() &lt;br /&gt;          If this JTable is the viewportView of an enclosing JScrollPane (the usual situation), configure this ScrollPane by, amongst other things, installing the table's tableHeader as the columnHeaderView of the scroll pane.&lt;br /&gt; int&lt;br /&gt;convertColumnIndexToModel(int viewColumnIndex) &lt;br /&gt;          Maps the index of the column in the view at viewColumnIndex to the index of the column in the table model.&lt;br /&gt; int&lt;br /&gt;convertColumnIndexToView(int modelColumnIndex) &lt;br /&gt;          Maps the index of the column in the table model at modelColumnIndex to the index of the column in the view.&lt;br /&gt;protected  TableColumnModel&lt;br /&gt;createDefaultColumnModel() &lt;br /&gt;          Returns the default column model object, which is a DefaultTableColumnModel.&lt;br /&gt; void&lt;br /&gt;createDefaultColumnsFromModel() &lt;br /&gt;          Creates default columns for the table from the data model using the getColumnCount method defined in the TableModel interface.&lt;br /&gt;protected  TableModel&lt;br /&gt;createDefaultDataModel() &lt;br /&gt;          Returns the default table model object, which is a DefaultTableModel.&lt;br /&gt;protected  void&lt;br /&gt;createDefaultEditors() &lt;br /&gt;          Creates default cell editors for objects, numbers, and boolean values.&lt;br /&gt;protected  void&lt;br /&gt;createDefaultRenderers() &lt;br /&gt;          Creates default cell renderers for objects, numbers, doubles, dates, booleans, and icons.&lt;br /&gt;protected  ListSelectionModel&lt;br /&gt;createDefaultSelectionModel() &lt;br /&gt;          Returns the default selection model object, which is a DefaultListSelectionModel.&lt;br /&gt;protected  JTableHeader&lt;br /&gt;createDefaultTableHeader() &lt;br /&gt;          Returns the default table header object, which is a JTableHeader.&lt;br /&gt;static JScrollPane&lt;br /&gt;createScrollPaneForTable(JTable aTable) &lt;br /&gt;          Deprecated. As of Swing version 1.0.2, replaced by new JScrollPane(aTable).&lt;br /&gt; void&lt;br /&gt;doLayout() &lt;br /&gt;          Causes this table to lay out its rows and columns.&lt;br /&gt; boolean&lt;br /&gt;editCellAt(int row, int column) &lt;br /&gt;          Programmatically starts editing the cell at row and column, if the cell is editable.&lt;br /&gt; boolean&lt;br /&gt;editCellAt(int row, int column, EventObject e) &lt;br /&gt;          Programmatically starts editing the cell at row and column, if the cell is editable.&lt;br /&gt; void&lt;br /&gt;editingCanceled(ChangeEvent e) &lt;br /&gt;          Invoked when editing is canceled.&lt;br /&gt; void&lt;br /&gt;editingStopped(ChangeEvent e) &lt;br /&gt;          Invoked when editing is finished.&lt;br /&gt; AccessibleContext&lt;br /&gt;getAccessibleContext() &lt;br /&gt;          Gets the AccessibleContext associated with this JTable.&lt;br /&gt; boolean&lt;br /&gt;getAutoCreateColumnsFromModel() &lt;br /&gt;          Determines whether the table will create default columns from the model.&lt;br /&gt; int&lt;br /&gt;getAutoResizeMode() &lt;br /&gt;          Returns the auto resize mode of the table.&lt;br /&gt; TableCellEditor&lt;br /&gt;getCellEditor() &lt;br /&gt;          Returns the cell editor.&lt;br /&gt; TableCellEditor&lt;br /&gt;getCellEditor(int row, int column) &lt;br /&gt;          Returns an appropriate editor for the cell specified by row and column.&lt;br /&gt; Rectangle&lt;br /&gt;getCellRect(int row, int column, boolean includeSpacing) &lt;br /&gt;          Returns a rectangle for the cell that lies at the intersection of row and column.&lt;br /&gt; TableCellRenderer&lt;br /&gt;getCellRenderer(int row, int column) &lt;br /&gt;          Returns an appropriate renderer for the cell specified by this row and column.&lt;br /&gt; boolean&lt;br /&gt;getCellSelectionEnabled() &lt;br /&gt;          Returns true if both row and column selection models are enabled.&lt;br /&gt; TableColumn&lt;br /&gt;getColumn(Object identifier) &lt;br /&gt;          Returns the TableColumn object for the column in the table whose identifier is equal to identifier, when compared using equals.&lt;br /&gt; Class&lt;br /&gt;getColumnClass(int column) &lt;br /&gt;          Returns the type of the column appearing in the view at column position column.&lt;br /&gt; int&lt;br /&gt;getColumnCount() &lt;br /&gt;          Returns the number of columns in the column model.&lt;br /&gt; TableColumnModel&lt;br /&gt;getColumnModel() &lt;br /&gt;          Returns the TableColumnModel that contains all column information of this table.&lt;br /&gt; String&lt;br /&gt;getColumnName(int column) &lt;br /&gt;          Returns the name of the column appearing in the view at column position column.&lt;br /&gt; boolean&lt;br /&gt;getColumnSelectionAllowed() &lt;br /&gt;          Returns true if columns can be selected.&lt;br /&gt; TableCellEditor&lt;br /&gt;getDefaultEditor(Class columnClass) &lt;br /&gt;          Returns the editor to be used when no editor has been set in a TableColumn.&lt;br /&gt; TableCellRenderer&lt;br /&gt;getDefaultRenderer(Class columnClass) &lt;br /&gt;          Returns the cell renderer to be used when no renderer has been set in a TableColumn.&lt;br /&gt; boolean&lt;br /&gt;getDragEnabled() &lt;br /&gt;          Gets the value of the dragEnabled property.&lt;br /&gt; int&lt;br /&gt;getEditingColumn() &lt;br /&gt;          Returns the index of the column that contains the cell currently being edited.&lt;br /&gt; int&lt;br /&gt;getEditingRow() &lt;br /&gt;          Returns the index of the row that contains the cell currently being edited.&lt;br /&gt; Component&lt;br /&gt;getEditorComponent() &lt;br /&gt;          Returns the component that is handling the editing session.&lt;br /&gt; Color&lt;br /&gt;getGridColor() &lt;br /&gt;          Returns the color used to draw grid lines.&lt;br /&gt; Dimension&lt;br /&gt;getIntercellSpacing() &lt;br /&gt;          Returns the horizontal and vertical space between cells.&lt;br /&gt; TableModel&lt;br /&gt;getModel() &lt;br /&gt;          Returns the TableModel that provides the data displayed by this JTable.&lt;br /&gt; Dimension&lt;br /&gt;getPreferredScrollableViewportSize() &lt;br /&gt;          Returns the preferred size of the viewport for this table.&lt;br /&gt; int&lt;br /&gt;getRowCount() &lt;br /&gt;          Returns the number of rows in this table's model.&lt;br /&gt; int&lt;br /&gt;getRowHeight() &lt;br /&gt;          Returns the height of a table row, in pixels.&lt;br /&gt; int&lt;br /&gt;getRowHeight(int row) &lt;br /&gt;          Returns the height, in pixels, of the cells in row.&lt;br /&gt; int&lt;br /&gt;getRowMargin() &lt;br /&gt;          Gets the amount of empty space, in pixels, between cells.&lt;br /&gt; boolean&lt;br /&gt;getRowSelectionAllowed() &lt;br /&gt;          Returns true if rows can be selected.&lt;br /&gt; int&lt;br /&gt;getScrollableBlockIncrement(Rectangle visibleRect, int orientation, int direction) &lt;br /&gt;          Returns visibleRect.height or visibleRect.width, depending on this table's orientation.&lt;br /&gt; boolean&lt;br /&gt;getScrollableTracksViewportHeight() &lt;br /&gt;          Returns false to indicate that the height of the viewport does not determine the height of the table.&lt;br /&gt; boolean&lt;br /&gt;getScrollableTracksViewportWidth() &lt;br /&gt;          Returns false if autoResizeMode is set to AUTO_RESIZE_OFF, which indicates that the width of the viewport does not determine the width of the table.&lt;br /&gt; int&lt;br /&gt;getScrollableUnitIncrement(Rectangle visibleRect, int orientation, int direction) &lt;br /&gt;          Returns the scroll increment (in pixels) that completely exposes one new row or column (depending on the orientation).&lt;br /&gt; int&lt;br /&gt;getSelectedColumn() &lt;br /&gt;          Returns the index of the first selected column, -1 if no column is selected.&lt;br /&gt; int&lt;br /&gt;getSelectedColumnCount() &lt;br /&gt;          Returns the number of selected columns.&lt;br /&gt; int[]&lt;br /&gt;getSelectedColumns() &lt;br /&gt;          Returns the indices of all selected columns.&lt;br /&gt; int&lt;br /&gt;getSelectedRow() &lt;br /&gt;          Returns the index of the first selected row, -1 if no row is selected.&lt;br /&gt; int&lt;br /&gt;getSelectedRowCount() &lt;br /&gt;          Returns the number of selected rows.&lt;br /&gt; int[]&lt;br /&gt;getSelectedRows() &lt;br /&gt;          Returns the indices of all selected rows.&lt;br /&gt; Color&lt;br /&gt;getSelectionBackground() &lt;br /&gt;          Returns the background color for selected cells.&lt;br /&gt; Color&lt;br /&gt;getSelectionForeground() &lt;br /&gt;          Returns the foreground color for selected cells.&lt;br /&gt; ListSelectionModel&lt;br /&gt;getSelectionModel() &lt;br /&gt;          Returns the ListSelectionModel that is used to maintain row selection state.&lt;br /&gt; boolean&lt;br /&gt;getShowHorizontalLines() &lt;br /&gt;          Returns true if the table draws horizontal lines between cells, false if it doesn't.&lt;br /&gt; boolean&lt;br /&gt;getShowVerticalLines() &lt;br /&gt;          Returns true if the table draws vertical lines between cells, false if it doesn't.&lt;br /&gt; boolean&lt;br /&gt;getSurrendersFocusOnKeystroke() &lt;br /&gt;          Returns true if the editor should get the focus when keystrokes cause the editor to be activated&lt;br /&gt; JTableHeader&lt;br /&gt;getTableHeader() &lt;br /&gt;          Returns the tableHeader used by this JTable.&lt;br /&gt; String&lt;br /&gt;getToolTipText(MouseEvent event) &lt;br /&gt;          Overrides JComponent's getToolTipText method in order to allow the renderer's tips to be used if it has text set.&lt;br /&gt; TableUI&lt;br /&gt;getUI() &lt;br /&gt;          Returns the L&amp;F object that renders this component.&lt;br /&gt; String&lt;br /&gt;getUIClassID() &lt;br /&gt;          Returns the suffix used to construct the name of the L&amp;F class used to render this component.&lt;br /&gt; Object&lt;br /&gt;getValueAt(int row, int column) &lt;br /&gt;          Returns the cell value at row and column.&lt;br /&gt;protected  void&lt;br /&gt;initializeLocalVars() &lt;br /&gt;          Initializes table properties to their default values.&lt;br /&gt; boolean&lt;br /&gt;isCellEditable(int row, int column) &lt;br /&gt;          Returns true if the cell at row and column is editable.&lt;br /&gt; boolean&lt;br /&gt;isCellSelected(int row, int column) &lt;br /&gt;          Returns true if the cell at the specified position is selected.&lt;br /&gt; boolean&lt;br /&gt;isColumnSelected(int column) &lt;br /&gt;          Returns true if the column at the specified index is selected.&lt;br /&gt; boolean&lt;br /&gt;isEditing() &lt;br /&gt;          Returns true if a cell is being edited.&lt;br /&gt; boolean&lt;br /&gt;isRowSelected(int row) &lt;br /&gt;          Returns true if the row at the specified index is selected.&lt;br /&gt; void&lt;br /&gt;moveColumn(int column, int targetColumn) &lt;br /&gt;          Moves the column column to the position currently occupied by the column targetColumn in the view.&lt;br /&gt;protected  String&lt;br /&gt;paramString() &lt;br /&gt;          Returns a string representation of this table.&lt;br /&gt; Component&lt;br /&gt;prepareEditor(TableCellEditor editor, int row, int column) &lt;br /&gt;          Prepares the editor by querying the data model for the value and selection state of the cell at row, column.&lt;br /&gt; Component&lt;br /&gt;prepareRenderer(TableCellRenderer renderer, int row, int column) &lt;br /&gt;          Prepares the renderer by querying the data model for the value and selection state of the cell at row, column.&lt;br /&gt;protected  boolean&lt;br /&gt;processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) &lt;br /&gt;          Invoked to process the key bindings for ks as the result of the KeyEvent e.&lt;br /&gt; void&lt;br /&gt;removeColumn(TableColumn aColumn) &lt;br /&gt;          Removes aColumn from this JTable's array of columns.&lt;br /&gt; void&lt;br /&gt;removeColumnSelectionInterval(int index0, int index1) &lt;br /&gt;          Deselects the columns from index0 to index1, inclusive.&lt;br /&gt; void&lt;br /&gt;removeEditor() &lt;br /&gt;          Discards the editor object and frees the real estate it used for cell rendering.&lt;br /&gt; void&lt;br /&gt;removeNotify() &lt;br /&gt;          Calls the unconfigureEnclosingScrollPane method.&lt;br /&gt; void&lt;br /&gt;removeRowSelectionInterval(int index0, int index1) &lt;br /&gt;          Deselects the rows from index0 to index1, inclusive.&lt;br /&gt;protected  void&lt;br /&gt;resizeAndRepaint() &lt;br /&gt;          Equivalent to revalidate followed by repaint.&lt;br /&gt; int&lt;br /&gt;rowAtPoint(Point point) &lt;br /&gt;          Returns the index of the row that point lies in, or -1 if the result is not in the range [0, getRowCount()-1].&lt;br /&gt; void&lt;br /&gt;selectAll() &lt;br /&gt;          Selects all rows, columns, and cells in the table.&lt;br /&gt; void&lt;br /&gt;setAutoCreateColumnsFromModel(boolean autoCreateColumnsFromModel) &lt;br /&gt;          Sets this table's autoCreateColumnsFromModel flag.&lt;br /&gt; void&lt;br /&gt;setAutoResizeMode(int mode) &lt;br /&gt;          Sets the table's auto resize mode when the table is resized.&lt;br /&gt; void&lt;br /&gt;setCellEditor(TableCellEditor anEditor) &lt;br /&gt;          Sets the cellEditor variable.&lt;br /&gt; void&lt;br /&gt;setCellSelectionEnabled(boolean cellSelectionEnabled) &lt;br /&gt;          Sets whether this table allows both a column selection and a row selection to exist simultaneously.&lt;br /&gt; void&lt;br /&gt;setColumnModel(TableColumnModel columnModel) &lt;br /&gt;          Sets the column model for this table to newModel and registers for listener notifications from the new column model.&lt;br /&gt; void&lt;br /&gt;setColumnSelectionAllowed(boolean columnSelectionAllowed) &lt;br /&gt;          Sets whether the columns in this model can be selected.&lt;br /&gt; void&lt;br /&gt;setColumnSelectionInterval(int index0, int index1) &lt;br /&gt;          Selects the columns from index0 to index1, inclusive.&lt;br /&gt; void&lt;br /&gt;setDefaultEditor(Class columnClass, TableCellEditor editor) &lt;br /&gt;          Sets a default cell editor to be used if no editor has been set in a TableColumn.&lt;br /&gt; void&lt;br /&gt;setDefaultRenderer(Class columnClass, TableCellRenderer renderer) &lt;br /&gt;          Sets a default cell renderer to be used if no renderer has been set in a TableColumn.&lt;br /&gt; void&lt;br /&gt;setDragEnabled(boolean b) &lt;br /&gt;          Sets the dragEnabled property, which must be true to enable automatic drag handling (the first part of drag and drop) on this component.&lt;br /&gt; void&lt;br /&gt;setEditingColumn(int aColumn) &lt;br /&gt;          Sets the editingColumn variable.&lt;br /&gt; void&lt;br /&gt;setEditingRow(int aRow) &lt;br /&gt;          Sets the editingRow variable.&lt;br /&gt; void&lt;br /&gt;setGridColor(Color gridColor) &lt;br /&gt;          Sets the color used to draw grid lines to gridColor and redisplays.&lt;br /&gt; void&lt;br /&gt;setIntercellSpacing(Dimension intercellSpacing) &lt;br /&gt;          Sets the rowMargin and the columnMargin -- the height and width of the space between cells -- to intercellSpacing.&lt;br /&gt; void&lt;br /&gt;setModel(TableModel dataModel) &lt;br /&gt;          Sets the data model for this table to newModel and registers with it for listener notifications from the new data model.&lt;br /&gt; void&lt;br /&gt;setPreferredScrollableViewportSize(Dimension size) &lt;br /&gt;          Sets the preferred size of the viewport for this table.&lt;br /&gt; void&lt;br /&gt;setRowHeight(int rowHeight) &lt;br /&gt;          Sets the height, in pixels, of all cells to rowHeight, revalidates, and repaints.&lt;br /&gt; void&lt;br /&gt;setRowHeight(int row, int rowHeight) &lt;br /&gt;          Sets the height for row to rowHeight, revalidates, and repaints.&lt;br /&gt; void&lt;br /&gt;setRowMargin(int rowMargin) &lt;br /&gt;          Sets the amount of empty space between cells in adjacent rows.&lt;br /&gt; void&lt;br /&gt;setRowSelectionAllowed(boolean rowSelectionAllowed) &lt;br /&gt;          Sets whether the rows in this model can be selected.&lt;br /&gt; void&lt;br /&gt;setRowSelectionInterval(int index0, int index1) &lt;br /&gt;          Selects the rows from index0 to index1, inclusive.&lt;br /&gt; void&lt;br /&gt;setSelectionBackground(Color selectionBackground) &lt;br /&gt;          Sets the background color for selected cells.&lt;br /&gt; void&lt;br /&gt;setSelectionForeground(Color selectionForeground) &lt;br /&gt;          Sets the foreground color for selected cells.&lt;br /&gt; void&lt;br /&gt;setSelectionMode(int selectionMode) &lt;br /&gt;          Sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals.&lt;br /&gt; void&lt;br /&gt;setSelectionModel(ListSelectionModel newModel) &lt;br /&gt;          Sets the row selection model for this table to newModel and registers for listener notifications from the new selection model.&lt;br /&gt; void&lt;br /&gt;setShowGrid(boolean showGrid) &lt;br /&gt;          Sets whether the table draws grid lines around cells.&lt;br /&gt; void&lt;br /&gt;setShowHorizontalLines(boolean showHorizontalLines) &lt;br /&gt;          Sets whether the table draws horizontal lines between cells.&lt;br /&gt; void&lt;br /&gt;setShowVerticalLines(boolean showVerticalLines) &lt;br /&gt;          Sets whether the table draws vertical lines between cells.&lt;br /&gt; void&lt;br /&gt;setSurrendersFocusOnKeystroke(boolean surrendersFocusOnKeystroke) &lt;br /&gt;          Sets whether editors in this JTable get the keyboard focus when an editor is activated as a result of the JTable forwarding keyboard events for a cell.&lt;br /&gt; void&lt;br /&gt;setTableHeader(JTableHeader tableHeader) &lt;br /&gt;          Sets the tableHeader working with this JTable to newHeader.&lt;br /&gt; void&lt;br /&gt;setUI(TableUI ui) &lt;br /&gt;          Sets the L&amp;F object that renders this component and repaints.&lt;br /&gt; void&lt;br /&gt;setValueAt(Object aValue, int row, int column) &lt;br /&gt;          Sets the value for the cell in the table model at row and column.&lt;br /&gt; void&lt;br /&gt;sizeColumnsToFit(boolean lastColumnOnly) &lt;br /&gt;          Deprecated. As of Swing version 1.0.3, replaced by doLayout().&lt;br /&gt; void&lt;br /&gt;sizeColumnsToFit(int resizingColumn) &lt;br /&gt;          Obsolete as of Java 2 platform v1.4.&lt;br /&gt; void&lt;br /&gt;tableChanged(TableModelEvent e) &lt;br /&gt;          Invoked when this table's TableModel generates a TableModelEvent.&lt;br /&gt;protected  void&lt;br /&gt;unconfigureEnclosingScrollPane() &lt;br /&gt;          Reverses the effect of configureEnclosingScrollPane by replacing the columnHeaderView of the enclosing scroll pane with null.&lt;br /&gt; void&lt;br /&gt;updateUI() &lt;br /&gt;          Notification from the UIManager that the L&amp;F has changed.&lt;br /&gt; void&lt;br /&gt;valueChanged(ListSelectionEvent e) &lt;br /&gt;          Invoked when the row selection changes -- repaints to show the new selection.&lt;br /&gt;_____________________________________________________________________________________&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-340120851374277781?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Xw9MtQfd8WhBThkT-hRfedmBMHA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xw9MtQfd8WhBThkT-hRfedmBMHA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Xw9MtQfd8WhBThkT-hRfedmBMHA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Xw9MtQfd8WhBThkT-hRfedmBMHA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/8x6zK-H3pdw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/340120851374277781/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/04/jtable-how-to-create-table-in-java.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/340120851374277781?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/340120851374277781?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/8x6zK-H3pdw/jtable-how-to-create-table-in-java.html" title="JTable: How to create Table in Java Swing" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/04/jtable-how-to-create-table-in-java.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEFQ386cSp7ImA9WhZSEE4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-2592921680066223168</id><published>2011-03-24T23:29:00.000-07:00</published><updated>2011-03-24T23:30:12.119-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T23:30:12.119-07:00</app:edited><title>Java Swing: JPopupMenu</title><content type="html">javax.swing &lt;br /&gt;Class JPopupMenu&lt;br /&gt;java.lang.Object&lt;br /&gt;  java.awt.Component&lt;br /&gt;      java.awt.Container&lt;br /&gt;          javax.swing.JComponent&lt;br /&gt;              javax.swing.JPopupMenu&lt;br /&gt;All Implemented Interfaces: &lt;br /&gt;Accessible, ImageObserver, MenuContainer, MenuElement, Serializable &lt;br /&gt;Direct Known Subclasses: &lt;br /&gt;BasicComboPopup &lt;br /&gt;&lt;br /&gt;public class JPopupMenu&lt;br /&gt;extends JComponent&lt;br /&gt;implements Accessible, MenuElement&lt;br /&gt;An implementation of a popup menu -- a small window that pops up and displays a series of choices. A JPopupMenu is used for the menu that appears when the user selects an item on the menu bar. It is also used for "pull-right" menu that appears when the selects a menu item that activates it. Finally, a JPopupMenu can also be used anywhere else you want a menu to appear. For example, when the user right-clicks in a specified area. &lt;br /&gt;For information and examples of using popup menus, see How to Use Menus in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&amp;F) renditions, see the JPopupMenu key assignments. &lt;br /&gt;Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-2592921680066223168?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Qr5BoDIcuH7ilhRf9dmnblUzhD8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qr5BoDIcuH7ilhRf9dmnblUzhD8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Qr5BoDIcuH7ilhRf9dmnblUzhD8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Qr5BoDIcuH7ilhRf9dmnblUzhD8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/b7tBopR_oW0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/2592921680066223168/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/03/java-swing-jpopupmenu.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2592921680066223168?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2592921680066223168?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/b7tBopR_oW0/java-swing-jpopupmenu.html" title="Java Swing: JPopupMenu" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/03/java-swing-jpopupmenu.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIDQnY_eyp7ImA9WhZSEE4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-1687797180234687246</id><published>2011-03-24T23:28:00.000-07:00</published><updated>2011-03-24T23:29:33.843-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T23:29:33.843-07:00</app:edited><title>Java Swing: JCheckBoxMenuItem</title><content type="html">javax.swing &lt;br /&gt;Class JCheckBoxMenuItem&lt;br /&gt;java.lang.Object&lt;br /&gt;  java.awt.Component&lt;br /&gt;      java.awt.Container&lt;br /&gt;          javax.swing.JComponent&lt;br /&gt;              javax.swing.AbstractButton&lt;br /&gt;                  javax.swing.JMenuItem&lt;br /&gt;                      javax.swing.JCheckBoxMenuItem&lt;br /&gt;All Implemented Interfaces: &lt;br /&gt;Accessible, ImageObserver, ItemSelectable, MenuContainer, MenuElement, Serializable, SwingConstants &lt;br /&gt;&lt;br /&gt;public class JCheckBoxMenuItem&lt;br /&gt;extends JMenuItem&lt;br /&gt;implements SwingConstants, Accessible&lt;br /&gt;A menu item that can be selected or deselected. If selected, the menu item typically appears with a checkmark next to it. If unselected or deselected, the menu item appears without a checkmark. Like a regular menu item, a check box menu item can have either text or a graphic icon associated with it, or both. &lt;br /&gt;Either isSelected/setSelected or getState/setState can be used to determine/specify the menu item's selection state. The preferred methods are isSelected and setSelected, which work for all menus and buttons. The getState and setState methods exist for compatibility with other component sets. &lt;br /&gt;For further information and examples of using check box menu items, see How to Use Menus, a section in The Java Tutorial. For the keyboard keys used by this component in the standard Look and Feel (L&amp;F) renditions, see the JCheckBoxMenuItem key assignments. &lt;br /&gt;Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-1687797180234687246?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JG6mZwGQUUx3TYerr-9P95g_ATg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JG6mZwGQUUx3TYerr-9P95g_ATg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JG6mZwGQUUx3TYerr-9P95g_ATg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JG6mZwGQUUx3TYerr-9P95g_ATg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/3HLprAPhVkI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/1687797180234687246/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/03/java-swing-jcheckboxmenuitem.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/1687797180234687246?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/1687797180234687246?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/3HLprAPhVkI/java-swing-jcheckboxmenuitem.html" title="Java Swing: JCheckBoxMenuItem" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/03/java-swing-jcheckboxmenuitem.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIGRXg6eCp7ImA9WhZSEE4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-4179033447055677067</id><published>2011-03-24T23:24:00.000-07:00</published><updated>2011-03-24T23:28:44.610-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T23:28:44.610-07:00</app:edited><title>Java Swing: JEditorPane</title><content type="html">javax.swing &lt;br /&gt;Class JEditorPane&lt;br /&gt;java.lang.Object&lt;br /&gt;  java.awt.Component&lt;br /&gt;      java.awt.Container&lt;br /&gt;          javax.swing.JComponent&lt;br /&gt;              javax.swing.text.JTextComponent&lt;br /&gt;                  javax.swing.JEditorPane&lt;br /&gt;All Implemented Interfaces: &lt;br /&gt;Accessible, ImageObserver, MenuContainer, Scrollable, Serializable &lt;br /&gt;Direct Known Subclasses: &lt;br /&gt;JTextPane &lt;br /&gt;&lt;br /&gt;public class JEditorPane&lt;br /&gt;extends JTextComponent&lt;br /&gt;A text component to edit various kinds of content. You can find how-to information and examples of using editor panes in Using Text Components, a section in The Java Tutorial. &lt;br /&gt;This component uses implementations of the EditorKit to accomplish its behavior. It effectively morphs into the proper kind of text editor for the kind of content it is given. The content type that editor is bound to at any given time is determined by the EditorKit currently installed. If the content is set to a new URL, its type is used to determine the EditorKit that should be used to load the content. &lt;br /&gt;By default, the following types of content are known: &lt;br /&gt;text/plain &lt;br /&gt;Plain text, which is the default the type given isn't recognized. The kit used in this case is an extension of DefaultEditorKit that produces a wrapped plain text view. &lt;br /&gt;text/html &lt;br /&gt;HTML text. The kit used in this case is the class javax.swing.text.html.HTMLEditorKit which provides HTML 3.2 support. &lt;br /&gt;text/rtf &lt;br /&gt;RTF text. The kit used in this case is the class javax.swing.text.rtf.RTFEditorKit which provides a limited support of the Rich Text Format. &lt;br /&gt;There are several ways to load content into this component. &lt;br /&gt;1. The setText method can be used to initialize the component from a string. In this case the current EditorKit will be used, and the content type will be expected to be of this type. &lt;br /&gt;2. The read method can be used to initialize the component from a Reader. Note that if the content type is HTML, relative references (e.g. for things like images) can't be resolved unless the base tag is used or the Base property on HTMLDocument is set. In this case the current EditorKit will be used, and the content type will be expected to be of this type. &lt;br /&gt;3. The setPage method can be used to initialize the component from a URL. In this case, the content type will be determined from the URL, and the registered EditorKit for that content type will be set. &lt;br /&gt;For the keyboard keys used by this component in the standard Look and Feel (L&amp;F) renditions, see the JEditorPane key assignments. &lt;br /&gt;Some kinds of content may provide hyperlink support by generating hyperlink events. The HTML EditorKit will generate hyperlink events if the JEditorPane is not editable (JEditorPane.setEditable(false); has been called). If HTML frames are embedded in the document, the typical response would be to change a portion of the current document. The following code fragment is a possible hyperlink listener implementation, that treats HTML frame events specially, and simply displays any other activated hyperlinks. &lt;br /&gt;     class Hyperactive implements HyperlinkListener {&lt;br /&gt; &lt;br /&gt;         public void hyperlinkUpdate(HyperlinkEvent e) {&lt;br /&gt;                  if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {&lt;br /&gt;                      JEditorPane pane = (JEditorPane) e.getSource();&lt;br /&gt;                      if (e instanceof HTMLFrameHyperlinkEvent) {&lt;br /&gt;                          HTMLFrameHyperlinkEvent  evt = (HTMLFrameHyperlinkEvent)e;&lt;br /&gt;                          HTMLDocument doc = (HTMLDocument)pane.getDocument();&lt;br /&gt;                          doc.processHTMLFrameHyperlinkEvent(evt);&lt;br /&gt;                      } else {&lt;br /&gt;                          try {&lt;br /&gt;                              pane.setPage(e.getURL());&lt;br /&gt;                          } catch (Throwable t) {&lt;br /&gt;                              t.printStackTrace();&lt;br /&gt;                          }&lt;br /&gt;                      }&lt;br /&gt;                  }&lt;br /&gt;              }&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Culturally dependent information in some documents is handled through a mechanism called character encoding. Character encoding is an unambiguous mapping of the members of a character set (letters, ideographs, digits, symbols, or control functions) to specific numeric code values. It represents the way the file is stored. Example character encodings are ISO-8859-1, ISO-8859-5, Shift-jis, Euc-jp, and UTF-8. When the file is passed to an user agent (JEditorPane) it is converted to the document character set (ISO-10646 aka Unicode). &lt;br /&gt;There are multiple ways to get a character set mapping to happen with JEditorPane. &lt;br /&gt;1. One way is to specify the character set as a parameter of the MIME type. This will be established by a call to the setContentType method. If the content is loaded by the setPage method the content type will have been set according to the specification of the URL. It the file is loaded directly, the content type would be expected to have been set prior to loading. &lt;br /&gt;2. Another way the character set can be specified is in the document itself. This requires reading the document prior to determining the character set that is desired. To handle this, it is expected that the EditorKit.read operation throw a ChangedCharSetException which will be caught. The read is then restarted with a new Reader that uses the character set specified in the ChangedCharSetException (which is an IOException).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-4179033447055677067?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/UiEAoz-AVyhhaG9xa1GFMDZG5eE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UiEAoz-AVyhhaG9xa1GFMDZG5eE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/UiEAoz-AVyhhaG9xa1GFMDZG5eE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/UiEAoz-AVyhhaG9xa1GFMDZG5eE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/-SZRIE-trk8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/4179033447055677067/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/03/java-swing-jeditorpane.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/4179033447055677067?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/4179033447055677067?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/-SZRIE-trk8/java-swing-jeditorpane.html" title="Java Swing: JEditorPane" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/03/java-swing-jeditorpane.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUBRHY-eCp7ImA9WhZSEE4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-2931455864964221252</id><published>2011-03-24T23:23:00.000-07:00</published><updated>2011-03-24T23:24:15.850-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T23:24:15.850-07:00</app:edited><title>Java Swing: ListCellRenderer</title><content type="html">javax.swing &lt;br /&gt;Interface ListCellRenderer&lt;br /&gt;&lt;br /&gt;public interface ListCellRenderer&lt;br /&gt;Identifies components that can be used as "rubber stamps" to paint the cells in a JList. For example, to use a JLabel as a ListCellRenderer, you would write something like this: &lt;br /&gt; class MyCellRenderer extends JLabel implements ListCellRenderer {&lt;br /&gt;     public MyCellRenderer() {&lt;br /&gt;         setOpaque(true);&lt;br /&gt;     }&lt;br /&gt;     public Component getListCellRendererComponent(&lt;br /&gt;         JList list,&lt;br /&gt;         Object value,&lt;br /&gt;         int index,&lt;br /&gt;         boolean isSelected,&lt;br /&gt;         boolean cellHasFocus)&lt;br /&gt;     {&lt;br /&gt;         setText(value.toString());&lt;br /&gt;         setBackground(isSelected ? Color.red : Color.white);&lt;br /&gt;         setForeground(isSelected ? Color.white : Color.black);&lt;br /&gt;         return this;&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;getListCellRendererComponent&lt;br /&gt;public Component getListCellRendererComponent(JList list,&lt;br /&gt;                                              Object value,&lt;br /&gt;                                              int index,&lt;br /&gt;                                              boolean isSelected,&lt;br /&gt;                                              boolean cellHasFocus)&lt;br /&gt;Return a component that has been configured to display the specified value. That component's paint method is then called to "render" the cell. If it is necessary to compute the dimensions of a list because the list cells do not have a fixed size, this method is called to generate a component on which getPreferredSize can be invoked. &lt;br /&gt;Parameters:&lt;br /&gt;list - The JList we're painting.&lt;br /&gt;value - The value returned by list.getModel().getElementAt(index).&lt;br /&gt;index - The cells index.&lt;br /&gt;isSelected - True if the specified cell was selected.&lt;br /&gt;cellHasFocus - True if the specified cell has the focus. &lt;br /&gt;Returns:&lt;br /&gt;A component whose paint() method will render the specified value.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-2931455864964221252?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fWf2eqtClyAJaZqmPUeAYRTIkso/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fWf2eqtClyAJaZqmPUeAYRTIkso/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fWf2eqtClyAJaZqmPUeAYRTIkso/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fWf2eqtClyAJaZqmPUeAYRTIkso/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/qiH4fAlCn0g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/2931455864964221252/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/03/java-swing-listcellrenderer.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2931455864964221252?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/2931455864964221252?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/qiH4fAlCn0g/java-swing-listcellrenderer.html" title="Java Swing: ListCellRenderer" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/03/java-swing-listcellrenderer.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUERnc9fCp7ImA9WhZSEE4.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-579062433620142224</id><published>2011-03-24T23:21:00.000-07:00</published><updated>2011-03-24T23:23:27.964-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-24T23:23:27.964-07:00</app:edited><title>Java Swings: Action</title><content type="html">javax.swing &lt;br /&gt;Interface Action&lt;br /&gt;All Superinterfaces: &lt;br /&gt;ActionListener, EventListener &lt;br /&gt;public interface Action&lt;br /&gt;extends ActionListener&lt;br /&gt;The Action interface provides a useful extension to the ActionListener interface in cases where the same functionality may be accessed by several controls. &lt;br /&gt;In addition to the actionPerformed method defined by the ActionListener interface, this interface allows the application to define, in a single place: &lt;br /&gt;One or more text strings that describe the function. These strings can be used, for example, to display the flyover text for a button or to set the text in a menu item. &lt;br /&gt;One or more icons that depict the function. These icons can be used for the images in a menu control, or for composite entries in a more sophisticated user interface. &lt;br /&gt;The enabled/disabled state of the functionality. Instead of having to separately disable the menu item and the toolbar button, the application can disable the function that implements this interface. All components which are registered as listeners for the state change then know to disable event generation for that item and to modify the display accordingly. &lt;br /&gt;Certain containers, including menus and tool bars, know how to add an Action object. When an Action object is added to such a container, the container: &lt;br /&gt;a. Creates a component that is appropriate for that container (a tool bar creates a button component, for example). &lt;br /&gt;b. Gets the appropriate property(s) from the Action object to customize the component (for example, the icon image and flyover text). &lt;br /&gt;c. Checks the initial state of the Action object to determine if it is enabled or disabled, and renders the component in the appropriate fashion. &lt;br /&gt;d. Registers a listener with the Action object so that is notified of state changes. When the Action object changes from enabled to disabled, or back, the container makes the appropriate revisions to the event-generation mechanisms and renders the component accordingly. &lt;br /&gt;For example, both a menu item and a toolbar button could access a Cut action object. The text associated with the object is specified as "Cut", and an image depicting a pair of scissors is specified as its icon. The Cut action-object can then be added to a menu and to a tool bar. Each container does the appropriate things with the object, and invokes its actionPerformed method when the component associated with it is activated. The application can then disable or enable the application object without worrying about what user-interface components are connected to it. &lt;br /&gt;This interface can be added to an existing class or used to create an adapter (typically, by subclassing AbstractAction). The Action object can then be added to multiple action-aware containers and connected to Action-capable components. The GUI controls can then be activated or deactivated all at once by invoking the Action object's setEnabled method. &lt;br /&gt;Note that Action implementations tend to be more expensive in terms of storage than a typical ActionListener, which does not offer the benefits of centralized control of functionality and broadcast of property changes. For th is reason, you should take care to only use Actions where their benefits are desired, and use simple ActionListeners elsewhere.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-579062433620142224?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/tZmdgAiGUW209h0ZFtRXYQ_4OOg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tZmdgAiGUW209h0ZFtRXYQ_4OOg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/tZmdgAiGUW209h0ZFtRXYQ_4OOg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/tZmdgAiGUW209h0ZFtRXYQ_4OOg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/7LwsermDDRA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/579062433620142224/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2011/03/java-swings-action.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/579062433620142224?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/579062433620142224?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/7LwsermDDRA/java-swings-action.html" title="Java Swings: Action" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2011/03/java-swings-action.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAHRX8_eCp7ImA9Wx5aEUQ.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-6149476822235602478</id><published>2010-11-07T21:34:00.000-08:00</published><updated>2010-11-07T21:38:54.140-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-07T21:38:54.140-08:00</app:edited><title>Servlet Overview In Question Form</title><content type="html">1.1 For each of the HTTP methods, GET, POST, and PUT, identify the corresponding method in the HttpServlet class.&lt;br /&gt;                      The HTTP methods GET, POST, and PUT are how browsers and Web servers communicate the purpose of communication. A GET simply wants to retrieve a page without providing much information. A POST, however, can package lots of form or file information with its request. A PUT is for uploading a file. The HttpServlet class has a corresponding method for each HTTP method, including doGet(), doPost(), and doPut().&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.2 For each of the HTTP methods, GET, POST, and HEAD, identify triggers that might cause a browser to use the method, and identify benefits or functionality of the method.&lt;br /&gt;&lt;br /&gt;This objective asks you to understand the events associated with each type of request. For example, clicking a hyperlink will send a GET request to a Web server, but clicking a Submit button (when the action is set to "post") will send a POST request.&lt;br /&gt;&lt;br /&gt;1.3 For each of the following operations, identify the interface and method name that should be used to&lt;br /&gt;&lt;br /&gt;Retrieve HTML form parameters from the request &lt;br /&gt;Retrieve a servlet initialization parameter &lt;br /&gt;Retrieve HTTP request header information &lt;br /&gt;Set an HTTP response header; set the content type of the response &lt;br /&gt;Acquire a text stream for the response &lt;br /&gt;Acquire a binary stream for the response &lt;br /&gt;Redirect an HTTP request to another URL &lt;br /&gt;This objective is huge. It encompasses the heart of a servlet process, especially the request and response objects. The request parameters for the servlet are the strings sent by the client to the Servlet Container. The container parses the request and puts the information in an HttpServletRequest object which is passed to the servlet. Going the other way, the container wraps the response parameters in an HttpServletResponse object which is passed back to the container. The associated chapter section later in this chapter ("Overriding HttpServlet GET, POST, and PUT methods") goes into much detail on the methods involved.&lt;br /&gt;&lt;br /&gt;1.4 Identify the interface and method to access values and resources and to set object attributes within the following three Web scopes:&lt;br /&gt;&lt;br /&gt;Request &lt;br /&gt;Session &lt;br /&gt;Context &lt;br /&gt;This objective addresses the idea of scope. When something has Context scope, it is application-wide and all users can share data. Session scope means one user can share data across page views, but other users can't. Request scope restricts data to only that page.&lt;br /&gt;&lt;br /&gt;1.5 Given a life-cycle method, identify correct statements about its purpose or about how and when it is invoked. These methods are&lt;br /&gt;&lt;br /&gt;init &lt;br /&gt;service &lt;br /&gt;destroy &lt;br /&gt;The container manages the servlet life-cycle. This part of the chapter explains, with examples, how the container initializes a servlet with a call to the init() method. Then it calls the service() method upon every request. Finally, when the servlet is about to be removed from memory, the container calls its destroy() method. This gives the servlet one last chance to clean up resources.&lt;br /&gt;&lt;br /&gt;1.6 Use a RequestDispatcher to include or forward to a Web resource.&lt;br /&gt;&lt;br /&gt;The RequestDispatcher object is the servlet forwarding mechanism. You will see in the section "Servlet Life-cycle" how you can transfer processing of the request from one servlet to another (which the browser will be unaware of). This is how a servlet can pass the request to some other Web component within the same Web container.&lt;br /&gt;&lt;br /&gt;3.1 Identify the uses for and the interfaces (or classes) and methods to achieve the following features:&lt;br /&gt;&lt;br /&gt;Servlet context initialization parameters &lt;br /&gt;Servlet context listener &lt;br /&gt;Servlet context attribute listener &lt;br /&gt;Session attribute listeners &lt;br /&gt;These elements let you get and monitor servlet attributes. Not only can you get them and change them too, but you can actually put in place behavior to occur when an attribute changes. The listeners are event-driven triggers. When an attribute changes, special targeted methods are called. In them, you can define special actions, such as adding a note to the log every time the user count changes (perhaps a context attribute called counter).&lt;br /&gt;&lt;br /&gt;3.3 Distinguish the behavior of the following in a distributable:&lt;br /&gt;&lt;br /&gt;Servlet context initialization parameters &lt;br /&gt;Servlet context listener &lt;br /&gt;Servlet context attribute listener &lt;br /&gt;Session attribute listeners &lt;br /&gt;As explained in the previous objective, these elements let you get and monitor Servlet attributes. There is a difference here in that Sun wants you to understand how this works in a distributable Web application.&lt;br /&gt;&lt;br /&gt;Outline&lt;br /&gt;Introduction&lt;br /&gt;&lt;br /&gt;Overriding HttpServlet GET, POST, and PUT Methods&lt;br /&gt;&lt;br /&gt;GET&lt;br /&gt;&lt;br /&gt;POST&lt;br /&gt;&lt;br /&gt;PUT&lt;br /&gt;&lt;br /&gt;Triggering HttpServlet GET, POST, and PUT Methods&lt;br /&gt;&lt;br /&gt;GET&lt;br /&gt;&lt;br /&gt;POST&lt;br /&gt;&lt;br /&gt;HEAD&lt;br /&gt;&lt;br /&gt;Interfacing with HTML Requests&lt;br /&gt;&lt;br /&gt;Form Parameters&lt;br /&gt;&lt;br /&gt;Retrieving a Servlet Initialization Parameter&lt;br /&gt;&lt;br /&gt;Retrieving HTTP Request Header Information&lt;br /&gt;&lt;br /&gt;Acquiring a Binary Stream for the Response&lt;br /&gt;&lt;br /&gt;Redirecting an HTTP Request to Another URL&lt;br /&gt;&lt;br /&gt;Web Application Scope&lt;br /&gt;&lt;br /&gt;Request&lt;br /&gt;&lt;br /&gt;Session&lt;br /&gt;&lt;br /&gt;Context&lt;br /&gt;&lt;br /&gt;Servlet Life-cycle&lt;br /&gt;&lt;br /&gt;Using a RequestDispatcher&lt;br /&gt;&lt;br /&gt;Web Application Context&lt;br /&gt;&lt;br /&gt;Context Within a Distributable Web Application&lt;br /&gt;&lt;br /&gt;The key to this section of the exam is understanding how servlets implement the Servlet interface, which defines life-cycle methods. The Servlet Container (such as Apache Tomcat) is itself an application that monitors a port on a given IP address. Servlets generate responses to HTTP requests. To do so, the container loads your servlet (if it isn't in memory already) and calls the methods defined in the interface. This is the foundation of servlet and JSP architecture.&lt;br /&gt;&lt;br /&gt;There are many methods to know. It is easier if you learn the methods in groups according to theme. For example, write a servlet that has HttpServlet methods which handle all three GET, POST, and PUT types of request.&lt;br /&gt;&lt;br /&gt;Each JavaServer Page is transformed into a servlet that is compiled and then loaded. Therefore much of what you learn here applies to the JSP section of the exam too.&lt;br /&gt;&lt;br /&gt;Introduction&lt;br /&gt;JSP and servlets have greatly enhanced the way in which you can create and manage Web pages. The difficulty level of coding JSP is between that of coding HTML and pure Java. Servlets are pure Java. The idea behind having both is providing a way for non-programmers to contribute functionality through JSP. You can "program" a JSP page almost as easily as you can write an HTML page. For simple tasks like displaying the current date, you write a normal HTML page and add only a small amount of Java as a scriptlet. For big tasks like processing a shopping cart, you use JSP as the mediator between the Web form and a component(s) (bean or servlet) that has all the horsepower. Most of the code in a Web application will go into servlets. The JSP portion is a soft front end to the application that, typically, marketing can use comfortably.&lt;br /&gt;&lt;br /&gt;There is a lot that happens when a servlet is invoked. This chapter covers much material that explains each step of the process. At this point, it will help to provide an overview of what happens in a typical JSP/servlet request. The sequence of events starts with a browser sending a request to a Web server. The server hands the request to a Servlet Container. The container loads the servlet (if it isn't already loaded), instantiates a request and response objects, and then hands these objects to the servlet by calling first its init() method, then its service() method, and lastly the destroy() method. The service() method will typically call one of the doXXX() methods such as doGet().&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How Does a Servlet Work? &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You write a servlet and compile it, and then place it in the appropriate directory. When the Servlet Container starts, it will preload your servlet in memory if specified in the web.xml configuration file. If your servlet is not already loaded (not listed in the web.xml configuration file), its instance will be created as soon as a request for it is received by the Servlet Container. The first time it is loaded, the container calls your servlet's init() method, if there is one. Notice that it gets called only once, so place one-off functionality in this method (such as database connection, file object). Now that your servlet is ready, it waits for requests. The container will call your service() method each time a request is received for your servlet. The HttpServlet class (which your servlet must extend) already has this method, so you don't have to write one, but you can override it. The service() method then passes the request on to the appropriate method (usually GET for simple requests and POST to submit data, say a Web page form) such as the doGet() method if it is a GET request, or the doPost() method if it is a POST request. The doXXX() methods are the ones you need to override and where you will spend most of your effort. The servlet processes the request (code you write in doGet()), returning a response to the container. The container sends the text of the response back to the browser.&lt;br /&gt;&lt;br /&gt;The preceding JSP and servlet examples are part of a Web application. A Web application is a collection of servlets, JSP pages, HTML documents, and other Web resources (such as image files, compressed archives, and other data). This collection may be packaged into an archive or exist as separate files in an open directory structure. Since you have many servlet classes, JSP pages, HTML pages, and other supporting libraries and files for a given Web application, there are many dependencies. These are not trivial to manage. It is vital that all parts go in their correct locations in the Web application archive or in an open directory structure. Once you get the dependencies resolved, it is a good idea to package the collection into a Web application archive, a single file with the .war extension that contains all of the components of a Web application. You can do this using standard JAR tools.&lt;br /&gt;&lt;br /&gt;Now, we need to define what is meant regarding deploying a Web application. Normally, Web applications run on only one VM at any one time. When we talk about deploying a Web application, we mean that the collection of files that comprise a Web application is placed into a Web server's runtime (at least one part goes into JVM, which can then link to or grab other parts). What happens if you want to deploy your Web application in a Web farm? In this case, your Web application will run on several VMs simultaneously.&lt;br /&gt;&lt;br /&gt;A distributable Web application is written so that it can be deployed in a Web container, distributed across multiple Java virtual machines running on the same host or different hosts. The two keys to making this possible are how you thread the servlets and what you tell the deployment descriptor. With the right combination of these, your Web application will run on several VMs simultaneously. The servlet declaration, which is part of the deployment descriptor, controls how the Servlet Container provides instances of the servlet. Normally, the Servlet Container uses only one instance per servlet declaration. However, for a servlet implementing the SingleThreadModel interface, the Servlet Container may instantiate multiple instances to handle a heavy request load and serialize requests to a particular instance.&lt;br /&gt;&lt;br /&gt;In the case where a servlet is marked in the deployment descriptor as distributable and the application implements the SingleThreadModel interface, the container may instantiate multiple instances of that servlet in each VM of the container or across many machines (clustering servlets usually through serialization). The container has a complicated task in managing requests, sessions, and contexts across JVMs. How each vendor accomplishes this is beyond the scope of this book. You do need to know that to convert your Web application into a distributable one, you must implement the SingleThreadModel interface and mark the servlet as distributable in the deployment descriptor (see Chapter 10, "Web Applications," for more about web.xml).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Overriding HttpServlet GET, POST, and PUT Methods&lt;br /&gt;1.1 For each of the HTTP methods, GET, POST, and PUT, identify the corresponding method in the HttpServlet class.&lt;br /&gt;&lt;br /&gt;GET&lt;br /&gt;&lt;br /&gt;POST&lt;br /&gt;&lt;br /&gt;PUT&lt;br /&gt;&lt;br /&gt;This exam objective addresses the most-used feature of servlets, namely, responding to HTTP requests. The exam will have several questions on this topic. These three types of requests dominate browser-server traffic.&lt;br /&gt;&lt;br /&gt;The following code is a minimal template showing you how to use the GET, POST, and PUT methods. GET appends data to the URL before the URL is submitted to the server, whereas POST sends the data to the server separately from the URL. GET submissions can only be 1KB in length in most cases, whereas POST submissions can be arbitrarily large. The results of a GET submission can be reliably bookmarked, whereas the results of a POST submission can't. There are several differences between them which are explained later in this section.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-6149476822235602478?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xJtMNo_VtWZ2REwNoaa_qaHe0AE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xJtMNo_VtWZ2REwNoaa_qaHe0AE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xJtMNo_VtWZ2REwNoaa_qaHe0AE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xJtMNo_VtWZ2REwNoaa_qaHe0AE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/esE_1sM3gXw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/6149476822235602478/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2010/11/servlet-overview-in-question-form.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/6149476822235602478?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/6149476822235602478?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/esE_1sM3gXw/servlet-overview-in-question-form.html" title="Servlet Overview In Question Form" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>1</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2010/11/servlet-overview-in-question-form.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkUNQnwzfCp7ImA9Wx5VEUU.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-8874909475691941227</id><published>2010-10-04T01:15:00.000-07:00</published><updated>2010-10-04T01:18:13.284-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-04T01:18:13.284-07:00</app:edited><title /><content type="html">1. main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;   int i=5;&lt;br /&gt;   printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);&lt;br /&gt;} Show Answers  4 Post Your Answers 17.09.09&lt;br /&gt;devin &lt;br /&gt;#define square(x) x*x&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   int i;&lt;br /&gt;   i = 125/square(5);&lt;br /&gt;   printf("%d",i);&lt;br /&gt;} NA  0 Post Your Answers &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;2. #define square(x) x*x&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   int i;&lt;br /&gt;   i = 125/square(5);&lt;br /&gt;   printf("%d",i);&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. main()&lt;br /&gt;{&lt;br /&gt;   char *p="hey friends",*p1;&lt;br /&gt;   p1=p;&lt;br /&gt;&lt;br /&gt;while(*p!='\0') ++*p++;&lt;br /&gt;   printf("%s   %s",p,p1);&lt;br /&gt;} NA  0 Post Your Answers &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;4. main()&lt;br /&gt;{&lt;br /&gt;   char *p="hai friends",*p1;&lt;br /&gt;   p1=p;&lt;br /&gt;&lt;br /&gt;while(*p!='\0') ++*p++;&lt;br /&gt;   &lt;br /&gt;   printf("%s   %s",p,p1);&lt;br /&gt;} Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. #include &lt;stdio.h&gt;&lt;br /&gt;#define i 10&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;#define i 50&lt;br /&gt;   printf("%d",i);&lt;br /&gt;} Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6.#define clrscr() 100&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   clrscr();&lt;br /&gt;   printf("%d\n",clrscr());&lt;br /&gt;} Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7.main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;printf("%p",main);&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8. main()&lt;br /&gt;{&lt;br /&gt;clrscr();&lt;br /&gt;}&lt;br /&gt;clrscr();&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;enum colors {BLACK,BLUE,GREEN}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9. main()&lt;br /&gt;{ &lt;br /&gt;   printf("%d..%d..%d",BLACK,BLUE,GREEN);  &lt;br /&gt;   return(1);&lt;br /&gt;}&lt;br /&gt; Show Answers  2 Post Your Answers 11.01.10&lt;br /&gt;Hitesh Kumar &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;10. void main()&lt;br /&gt;{&lt;br /&gt;   char far *farther,*farthest;&lt;br /&gt;   printf("%d..%d",sizeof(farther),sizeof(farthest));&lt;br /&gt;}&lt;br /&gt; NA  0 Post Your Answers &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;11. main()&lt;br /&gt;{&lt;br /&gt;   int i=400,j=300;&lt;br /&gt;   printf("%d..%d");&lt;br /&gt;} Show Answers  2 Post Your Answers 18.07.09&lt;br /&gt;xyz &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. main()&lt;br /&gt;{&lt;br /&gt;   char *p;&lt;br /&gt;   p="java";&lt;br /&gt;   printf("%c\n",*&amp;*p);&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;13. main()&lt;br /&gt;{&lt;br /&gt;    int i=1;&lt;br /&gt;    while (i&lt;=5)&lt;br /&gt;    {&lt;br /&gt;    printf("%d",i);&lt;br /&gt;    if (i&gt;2)&lt;br /&gt;    goto here;&lt;br /&gt;    i++;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;fun()&lt;br /&gt;{&lt;br /&gt;    here:&lt;br /&gt;    printf("PP");&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14.  main()&lt;br /&gt;{&lt;br /&gt;   static char names[5][20]={"pascal","ada","cobol","fortran","perl"};&lt;br /&gt;   int i;&lt;br /&gt;   char *t;&lt;br /&gt;   t=names[3];&lt;br /&gt;   names[3]=names[4];&lt;br /&gt;   names[4]=t;  &lt;br /&gt;   for (i=0;i&lt;=4;i++)&lt;br /&gt;   printf("%s Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15. void main()&lt;br /&gt;{&lt;br /&gt;    int a=5;&lt;br /&gt;    printf("%d",a++ + ++a);&lt;br /&gt;}&lt;br /&gt; Show Answers  3 Post Your Answers 30.05.09&lt;br /&gt;selva &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16. void main()&lt;br /&gt;{&lt;br /&gt;    int i=5;&lt;br /&gt;    printf("%d",i+++++i);&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17. #include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   int i=1,j=2;&lt;br /&gt;   switch(i)&lt;br /&gt;{&lt;br /&gt;   case 1:  printf("GOOD");&lt;br /&gt;            break;&lt;br /&gt;   case j:  printf("BAD");&lt;br /&gt;            break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;18. main()&lt;br /&gt;{&lt;br /&gt;   int i;&lt;br /&gt;   printf("%d",scanf("%d",&amp;i));  // value 10 is given as input here&lt;br /&gt;}&lt;br /&gt; Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;19. #define f(g,g2) g##g2&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   int var12=100;&lt;br /&gt;   printf("%d",f(var,12));&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-8874909475691941227?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OTzi013RMn1SAaGe9BIRPTAtYGo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OTzi013RMn1SAaGe9BIRPTAtYGo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OTzi013RMn1SAaGe9BIRPTAtYGo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OTzi013RMn1SAaGe9BIRPTAtYGo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/7ZLD6-QZB00" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/8874909475691941227/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2010/10/1.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/8874909475691941227?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/8874909475691941227?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/7ZLD6-QZB00/1.html" title="" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2010/10/1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUIMRXs7fyp7ImA9Wx5VEUo.&quot;"><id>tag:blogger.com,1999:blog-1746040478424954926.post-3276406646893221150</id><published>2010-10-04T00:29:00.000-07:00</published><updated>2010-10-04T00:33:04.507-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-04T00:33:04.507-07:00</app:edited><title>C Objective Question Test-2</title><content type="html">1. What is output of following program when we compile and run it?&lt;br /&gt; void main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;      int  const * p=5;&lt;br /&gt;&lt;br /&gt;      printf("%d",++(*p));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt; Show Answers  44 Post Your Answers &lt;br /&gt;manideep &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. What is output of followingvoid &lt;br /&gt;main(){&lt;br /&gt;char ch;&lt;br /&gt;for(ch=0;ch&lt;=127;ch  )&lt;br /&gt;printf("%c   %d \n", ch, ch);&lt;br /&gt;}&lt;br /&gt;Show Answers  10 Post Your Answers 14.09.10&lt;br /&gt;Nithiya &lt;br /&gt;&lt;br /&gt;3.Is this code legal?&lt;br /&gt;int *ptr;&lt;br /&gt;ptr = (int *) 0x400;&lt;br /&gt; Show Answers  5 Post Your Answers 06.09.09&lt;br /&gt;abickybaba09@gamil.com &lt;br /&gt;&lt;br /&gt;4. What is output of following? &lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;      char s[ ]="man";&lt;br /&gt;&lt;br /&gt;      int i;&lt;br /&gt;&lt;br /&gt;      for(i=0;s[ i ];i++)&lt;br /&gt;&lt;br /&gt;      printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt; Show Answers  6 Post Your Answers &lt;br /&gt;prabu &lt;br /&gt;&lt;br /&gt;5. What is output of following??&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;      float f1 = 1.0;&lt;br /&gt;&lt;br /&gt;      double f2 = 1.0;&lt;br /&gt;&lt;br /&gt;      if(f1==f2)&lt;br /&gt;&lt;br /&gt;printf("I love U");&lt;br /&gt;&lt;br /&gt;else&lt;br /&gt;&lt;br /&gt;            printf("I hate U");&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt; Show Answers  5 Post Your Answers 07.10.09&lt;br /&gt;Antriksh &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6. What is output of following &lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;   {&lt;br /&gt;char a[4]="HELLO";&lt;br /&gt;printf("%s",a);&lt;br /&gt;}     &lt;br /&gt; Show Answers  12 Post Your Answers 06.09.10&lt;br /&gt;Vijay thakur &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;7. What is output of following?&lt;br /&gt;main()&lt;br /&gt;{    &lt;br /&gt;char a[4]="HELL";&lt;br /&gt;printf("%s",a);&lt;br /&gt;}&lt;br /&gt; Show Answers  5 Post Your Answers 22.05.09&lt;br /&gt;suresh &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;8.What is output of following?&lt;br /&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;            int a=10,*j;&lt;br /&gt;      void *k;&lt;br /&gt;            j=k=&amp;a;&lt;br /&gt;      j++; &lt;br /&gt;            k++;&lt;br /&gt;      printf("\n %u %u ",j,k);&lt;br /&gt;} &lt;br /&gt; Show Answers  26 Post Your Answers 22.11.09&lt;br /&gt;Ashutosh Sharma &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;9. What values are printed when we run following?&lt;br /&gt;main()&lt;br /&gt;&lt;br /&gt;      {&lt;br /&gt;&lt;br /&gt;      static int var = 5;&lt;br /&gt;&lt;br /&gt;      printf("%d ",var--);&lt;br /&gt;&lt;br /&gt;      if(var)&lt;br /&gt;&lt;br /&gt;            main();&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt; Show Answers  4 Post Your Answers 27.09.09&lt;br /&gt;db &lt;br /&gt;&lt;br /&gt;10. main()&lt;br /&gt;&lt;br /&gt;   {&lt;br /&gt;&lt;br /&gt;  int c[ ]={2.8,3.4,4,6.7,5};&lt;br /&gt;&lt;br /&gt;  int j,*p=c,*q=c;&lt;br /&gt;&lt;br /&gt;  for(j=0;j&lt;5;j++) {&lt;br /&gt;&lt;br /&gt;  printf(" %d ",*c);&lt;br /&gt;&lt;br /&gt;     ++q;   }&lt;br /&gt;&lt;br /&gt;  for(j=0;j&lt;5;j++){&lt;br /&gt;&lt;br /&gt;      printf(" %d ",*p);&lt;br /&gt;&lt;br /&gt;      ++p;   }&lt;br /&gt;&lt;br /&gt;   } Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek &lt;br /&gt;&lt;br /&gt;11. main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;      extern int i;&lt;br /&gt;      i=20;&lt;br /&gt;      printf("%d",i);&lt;br /&gt;} Show Answers  19 Post Your Answers 29.01.10&lt;br /&gt;siva &lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;      int i=-1,j=-1,k=0,l=2,a;&lt;br /&gt;      a=i++&amp;&amp;j++&amp;&amp;k++||l++;&lt;br /&gt;      printf("%d %d %d %d %d",i,j,k,l,a);&lt;br /&gt;}&lt;br /&gt; Show Answers  25 Post Your Answers &lt;br /&gt;Harish Mandoliya &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. main()&lt;br /&gt;{&lt;br /&gt;      int c=- -2;&lt;br /&gt;      printf("c=%d",c);&lt;br /&gt;} Show Answers  2 Post Your Answers 01.08.09&lt;br /&gt;neha &lt;br /&gt;&lt;br /&gt;13. #define int char&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;      int i=65;&lt;br /&gt;      printf("sizeof(i)=%d",sizeof(i));&lt;br /&gt;} Show Answers  7 Post Your Answers &lt;br /&gt;prabu &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;14. main()&lt;br /&gt;{&lt;br /&gt;    int a=10;&lt;br /&gt;    a=!a&gt;14;   &lt;br /&gt;    Printf ("a=%d",a);&lt;br /&gt;}&lt;br /&gt; Show Answers  5 Post Your Answers 06.04.10&lt;br /&gt;Vinit Dhama &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;15. #include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   char s[]={'a','b','c','\n','c','\0'};&lt;br /&gt;   char *p,*str,*str1;&lt;br /&gt;   p=&amp;s[3];&lt;br /&gt;   str=p;&lt;br /&gt;   str1=s;&lt;br /&gt;   printf("%d",++*p + ++*str1-32);&lt;br /&gt;}&lt;br /&gt; Show Answers  2 Post Your Answers 06.04.10&lt;br /&gt;Vinit Dhama &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16. #include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   int a[2][2][2] = {{10,2,3,4},{5,6,7,8}};&lt;br /&gt;   int *p,*q;&lt;br /&gt;   p=&amp;a[2][2][2];&lt;br /&gt;   *q=***a;&lt;br /&gt;   printf("%d----%d",*p,*q);&lt;br /&gt;} Show Answers  3 Post Your Answers 22.09.10&lt;br /&gt;neelesh_gaur &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;17. #include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   struct xx&lt;br /&gt;{&lt;br /&gt;   int x=3;&lt;br /&gt;   char name[]="vivek";&lt;br /&gt;};&lt;br /&gt;   struct xx *s;&lt;br /&gt;   printf("%d",s-&gt;x);&lt;br /&gt;   printf("%s",s-&gt;name);&lt;br /&gt;} Show Answers  2 Post Your Answers 23.11.09&lt;br /&gt;Shruthi &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;18. #include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;   struct xx&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;int x;&lt;br /&gt;struct yy&lt;br /&gt;{&lt;br /&gt;   char s;&lt;br /&gt;   struct xx *p;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;struct yy *q;&lt;br /&gt;&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;} Show Answers  1 Post Your Answers 28.12.08&lt;br /&gt;Vivek kr. Agarwal &lt;br /&gt;&lt;br /&gt;19. main()&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;   printf("\nab"); &lt;br /&gt;   printf("\bsi");&lt;br /&gt;   printf("\rha");&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1746040478424954926-3276406646893221150?l=itmcacs.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9E4evI1l_EjTh6kW3pH1s8A6bf4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9E4evI1l_EjTh6kW3pH1s8A6bf4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9E4evI1l_EjTh6kW3pH1s8A6bf4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9E4evI1l_EjTh6kW3pH1s8A6bf4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/CcjavadsdatabaseMcaCusat/~4/c504LVXkW40" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://itmcacs.blogspot.com/feeds/3276406646893221150/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://itmcacs.blogspot.com/2010/10/c-objective-question-test-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/3276406646893221150?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/1746040478424954926/posts/default/3276406646893221150?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CcjavadsdatabaseMcaCusat/~3/c504LVXkW40/c-objective-question-test-2.html" title="C Objective Question Test-2" /><author><name>Ram Pravesh Kumar</name><uri>http://www.blogger.com/profile/11434271641989446937</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="http://4.bp.blogspot.com/_9Qemfntrn78/S5C_9u23N3I/AAAAAAAAACM/VAOYqczKU3g/S220/RAM+PRAKESH++14.1.10.JPG" /></author><thr:total>0</thr:total><feedburner:origLink>http://itmcacs.blogspot.com/2010/10/c-objective-question-test-2.html</feedburner:origLink></entry></feed>

