<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8368035411264836475</id><updated>2012-02-14T01:14:23.625-08:00</updated><title type='text'>Java Technology  Blogs</title><subtitle type='html'>This Blog is the result of my brain storm of ideas for java language which really helps the java beginners.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>52</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3655911332044584689</id><published>2011-09-18T23:08:00.000-07:00</published><updated>2011-09-18T23:08:06.979-07:00</updated><title type='text'>J2EE Interview Questions &amp; Answers</title><content type='html'>&lt;a href="http://jspservlettutorial.info/latest-id-104-tid-517-J2EE-Interview-Questions-and-Answers.html"&gt;J2EE Interview Questions &amp;amp; Answers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;J2EE is a Java 2 Enterprise Edition. J2EE is an environment for developing and deploying enterprise applications. J2EE specification is defined by Sun Microsystems Inc. The J2EE platform is lies of a set of services, application programming interfaces (APIs), and protocols, which provides the functionality necessary for developing multi-tiered, web-based applications. The J2EE platform is one of the richest platform for the development and deployment of enterprise applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3655911332044584689?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3655911332044584689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2011/09/j2ee-interview-questions-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3655911332044584689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3655911332044584689'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2011/09/j2ee-interview-questions-answers.html' title='J2EE Interview Questions &amp; Answers'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4566197703927652416</id><published>2011-09-18T22:54:00.000-07:00</published><updated>2011-09-18T22:54:04.659-07:00</updated><title type='text'>Googleforum.info: What is the difference between linker and assembler?</title><content type='html'>&lt;a href="http://www.googleforum.info/viewpost-answers-1138.html#.TnbY40Z8XBc.blogger"&gt;Googleforum.info: What is the difference between linker and assembler?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Answer1: Here's how it works(Assembler):Most computers come with a specified set of very basic instructions that correspond to the basic machine operations that the computer can perform. For example, a "Load" instruction causes the processor to move a string of bits from a location in the processor's memory to a special holding place called a register. Assuming the processor has at least eight registers, each numbered, the following instruction would move the value (string of bits of a certain length) at memory location 3000 into the holding place called register&lt;br /&gt;Posted On: 2011-09-13  By: Sandeep K Suman&lt;br /&gt;&lt;br /&gt;Answer2: An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use to perform its basic operations. Some people call these instructions assembler language and others use the term assembly language.&lt;br /&gt;Posted On: 2011-09-13  By: Sandeep K Suman&lt;br /&gt;&lt;br /&gt;Answer3: A linker is a program that combines object modules to form an executable program. Many programming languages allow you to write different pieces of code, called modules, separately. This simplifies the programming task because you can break a large program into small, more manageable pieces. Eventually, though, you need to put all the modules together. This is the job of the linker. In addition to combining modules, a linker also replaces symbolic addresses with real addresses. Therefore, you may need to link a program even if it contains only one module.&lt;br /&gt;Posted On: 2011-09-13  By: Sandeep K Suman&lt;br /&gt;&lt;br /&gt;Answer4: A program that combines one or more files containing object code  into a single file containing executable code. The linker resolves external references among the files, such as function calls. The output of a linker is a machine-code program ready to be loaded into memory and executed.&lt;br /&gt;Posted On: 2011-09-13  By: Sandeep K Suman&lt;br /&gt;&lt;br /&gt;Answer5: In computer science, a linker or link editor is a program that takes one or more objects generated by a compiler and combines them into a single executable program.&lt;br /&gt;Posted On: 2011-09-13  By: Sandeep K Suman&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4566197703927652416?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4566197703927652416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2011/09/googleforuminfo-what-is-difference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4566197703927652416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4566197703927652416'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2011/09/googleforuminfo-what-is-difference.html' title='Googleforum.info: What is the difference between linker and assembler?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-2070382261043212013</id><published>2011-09-18T22:48:00.000-07:00</published><updated>2011-09-18T22:49:46.816-07:00</updated><title type='text'>MySQL Interview Questions &amp; Answers</title><content type='html'>&lt;a href="http://jspservlettutorial.info/latest-id-104-tid-521-MySQL-Interview-Questions-and-Answers.html#.TnbXCp5Mk9g.blogger"&gt;MySQL Interview Questions &amp;amp; Answers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What is the most important feature of Java?&lt;br /&gt;Java is a platform independent language.&lt;br /&gt;&lt;br /&gt;What do you mean by platform independence?&lt;br /&gt;&lt;br /&gt;Platform independence means that we can write and compile the java code in one platform like (Windows) and we can execute the class in any other supported platform like (Linux, Solaris etc).&lt;br /&gt;&lt;br /&gt;Is JVM platform independent?&lt;br /&gt;&lt;br /&gt;JVM is not platform independent. It is a platform specific run time implementation provided by the vendor.&lt;br /&gt;&lt;br /&gt;What is a JVM?&lt;br /&gt;&lt;br /&gt;JVM is Java Virtual Machine which is a run time environment for the compiled java class files.&lt;br /&gt;&lt;br /&gt;Difference between JRE/JVM/JDK?&lt;br /&gt;&lt;br /&gt;To See in Details Click on this Link:- http://javasks.blogspot.com/2009/01/difference-between-jre-jvm-and-jdk.html&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-2070382261043212013?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/2070382261043212013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2011/09/mysql-interview-questions-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/2070382261043212013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/2070382261043212013'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2011/09/mysql-interview-questions-answers.html' title='MySQL Interview Questions &amp; Answers'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-6439491448518095683</id><published>2010-03-08T23:56:00.000-08:00</published><updated>2010-03-08T23:56:46.609-08:00</updated><title type='text'>Online free training</title><content type='html'>Take a free online training on any technology like java, jsp, servlet, hibernate, php, spring, flex.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for more details pls visit: http://jspservlettutorial.info&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-6439491448518095683?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/6439491448518095683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2010/03/online-free-training.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6439491448518095683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6439491448518095683'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2010/03/online-free-training.html' title='Online free training'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-9215415197339801019</id><published>2010-01-16T06:31:00.000-08:00</published><updated>2010-01-16T06:45:38.954-08:00</updated><title type='text'>Percentile Calculation in C++</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Question:&lt;/span&gt; Write a program for the problem: the array of inetegers indicating the marks of the students is given, U have to calculate the percentile of the students aaccording to this rule: the percentile of a student is the %of no of student having marks less then him. For eg: suppose&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Studen&lt;/span&gt;t         &lt;span style="font-weight: bold;"&gt;Marks&lt;/span&gt;&lt;br /&gt;A                                           12&lt;br /&gt;B                                           60&lt;br /&gt;C                                           80&lt;br /&gt;D                                          71&lt;br /&gt;E                                           30&lt;br /&gt;F                                           45&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;percentile of C = 5/5 *100 = 100 (out of 5 students, 5 are having marks less then him)&lt;br /&gt;&lt;br /&gt;percentile of B = 3/5*100 = 60% (out of 5, 3 have markses less then him)&lt;br /&gt;&lt;br /&gt;percentile of A = 0/5*100 = 0%.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Answer:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 128, 0); font-family: Tahoma; font-size: 12px; white-space: pre;"&gt;#include&lt;iostream.h&gt;&lt;br /&gt;#include&lt;conio.h&gt;&lt;br /&gt;&lt;br /&gt; void main()&lt;br /&gt; {&lt;br /&gt;   clrscr();&lt;br /&gt;   int a[10],n,i,j;&lt;br /&gt;   int percent;&lt;br /&gt;   int count;&lt;br /&gt;   cout&lt;&lt;"&lt;br /&gt;enter the size of array";&lt;br /&gt;   cin&gt;&gt;n;&lt;br /&gt;  cout&lt;&lt;"&lt;br /&gt;enter the values";&lt;br /&gt;   for(i=0;i&lt;=n-1;i++)&lt;br /&gt;   {&lt;br /&gt;      cout&lt;&lt;" a["&lt;&lt;i&lt;&lt;"]"&lt;&lt;"=";&lt;br /&gt;      cin&gt;&gt;a[i];&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   for( i=0;i&lt;=n-1;i++)&lt;br /&gt;    { count=0;&lt;br /&gt;    for(j=0;j&lt;=n-1;j++)&lt;br /&gt;    {  if(a[i]&gt;a[j])&lt;br /&gt;	{&lt;br /&gt;	count=count+1;&lt;br /&gt;	}&lt;br /&gt;	}&lt;br /&gt;	percent=(count*100)/(n-1);&lt;br /&gt;    cout&lt;&lt;"&lt;br /&gt;&lt;br /&gt;the percentile of"&lt;&lt;"a["&lt;&lt;i&lt;&lt;"]"&lt;&lt;percent;&lt;br /&gt;    }&lt;br /&gt;    getch();&lt;br /&gt;&lt;br /&gt;    }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-9215415197339801019?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/9215415197339801019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2010/01/percentile-calculation-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/9215415197339801019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/9215415197339801019'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2010/01/percentile-calculation-in-c.html' title='Percentile Calculation in C++'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3065054429764116285</id><published>2009-11-12T22:00:00.001-08:00</published><updated>2009-11-22T08:19:42.603-08:00</updated><title type='text'>Gmail: Move Chat To Right Side</title><content type='html'>&lt;a name="fb_share" type="button_count" share_url="http://www.javasks.blogspot.com" href="http://www.facebook.com/sharer.php"&gt;Share&lt;/a&gt;&lt;script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"&gt;&lt;/script&gt;&lt;br /&gt;&lt;br /&gt;Gmail: Chat is not working in left side? You can move it to the right side.&lt;br /&gt;&lt;br /&gt;1. Login to Gmail.&lt;br /&gt;&lt;br /&gt;2. Click the Settings link in the upper-right corner.&lt;br /&gt;&lt;br /&gt;3. Click the Labs link.&lt;br /&gt;&lt;br /&gt;4. Scroll down to where it option right side chat. Click Enable.&lt;br /&gt;&lt;br /&gt;5. Scroll to the bottom and click Save Changes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3065054429764116285?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3065054429764116285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/11/gmail-move-chat-to-right-side.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3065054429764116285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3065054429764116285'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/11/gmail-move-chat-to-right-side.html' title='Gmail: Move Chat To Right Side'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-905791071777167584</id><published>2009-10-11T06:01:00.000-07:00</published><updated>2009-10-11T06:05:05.778-07:00</updated><title type='text'>How to Use Google Adsense Account for More Than One Site or Blog</title><content type='html'>1. Log on to your Google Adsense account. There are four tabs at the top of the page. The defaulted one (the one you're on) is "Reports."&lt;br /&gt;&lt;br /&gt;2. Click the "Adsense Setup" tab.&lt;br /&gt;&lt;br /&gt;3. Choose the type of Adsense ad you'd like to add to your website. Continue through the ad-creating interface as usual.&lt;br /&gt;&lt;br /&gt;4. When you reach the page that allows you to add channels, stop. Here, click the "Add New Channel" text link. Name the channel something that you will readily identify as pertaining to this particular site. For instance, if you own abc.com and xyz.com, and this add is for the latter site, name your channel xyz.com.&lt;br /&gt;&lt;br /&gt;5. Next time you log in to your account to check your Google Adsense statistics, click on the "Top Channels" text link on the Reports page. This will give you a breakdown of your number of page views, number of clicks, CTR (click through rate), and earnings by channel. This will enable you to determine which site is earning more money for you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-905791071777167584?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/905791071777167584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/10/how-to-use-google-adsense-account-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/905791071777167584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/905791071777167584'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/10/how-to-use-google-adsense-account-for.html' title='How to Use Google Adsense Account for More Than One Site or Blog'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-7061416699225646839</id><published>2009-07-24T00:55:00.000-07:00</published><updated>2009-07-24T00:58:19.294-07:00</updated><title type='text'>Saigun Technology Pvt. Ltd. Written test paper and interview questions with answers</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Core Java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What is the most important feature of Java? &lt;br /&gt;Java is a platform independent language. &lt;br /&gt;What do you mean by platform independence? &lt;br /&gt;Platform independence means that we can write and compile the java code in one platform like (Windows) and we can execute the class in any other supported platform like (Linux, Solaris etc).&lt;br /&gt;Is JVM platform independent?&lt;br /&gt;JVM is not platform independent. It is a platform specific run time implementation provided by the vendor.&lt;br /&gt;What is a JVM?&lt;br /&gt;JVM is Java Virtual Machine which is a run time environment for the compiled java class files.&lt;br /&gt;Difference between JRE/JVM/JDK? To See in Details Click on this Link:- &lt;br /&gt;JDK (Java Development Kit)&lt;br /&gt;&lt;br /&gt;JDK= JDK tools + JRE&lt;br /&gt;&lt;br /&gt;JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.&lt;br /&gt;&lt;br /&gt;JDK contains tools required to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…&lt;br /&gt;&lt;br /&gt;JAVA Compiler converts java code into byte code. and java application launcher opens a JRE, loads the class, and invokes its main method.&lt;br /&gt;&lt;br /&gt;If you want to write and compile your own programs, you need JDK. If you just want to run your java programs, JRE is sufficient. JRE is targeted for execution of Java files&lt;br /&gt;&lt;br /&gt;You can create a Java file (with the help of Java packages), compile a Java file and run a java file. JDK is mainly targeted for java development.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JRE (Java Runtime Environment)&lt;br /&gt;Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JVM(Java Virtual Machine)&lt;br /&gt;The Java Virtual Machine provides a platform-independent way of executing code, programmers can concentrate on writing application, without having to be concerned with how or where it will run.&lt;br /&gt;What is Externalizable? - Externalizable is an Interface that covers Serializable Interface. It sends data into Streams in Compressed Format. It has two methods, that is: writeExternal (ObjectOuput out) and readExternal (ObjectInput in).&lt;br /&gt;What is a pointer and does Java support pointers? &lt;br /&gt;Pointer is a reference deal to a memory location. Improper treating of pointers leads to memory escapes and reliability issues hence Java doesn't support the usage of pointers. &lt;br /&gt;Does Java support multiple inheritance?&lt;br /&gt;Java doesn't support multiple inheritance.&lt;br /&gt;Is Java a pure object oriented language? &lt;br /&gt;Java is not a pure object oriented language because it uses primitive data types.&lt;br /&gt;What is difference between Path and Classpath? &lt;br /&gt;Path and Classpath are operating system level environment variables. Path is used define where the system can find the executables (.exe) files and Classpath is used to specify the location .class files.&lt;br /&gt;Can there be an abstract class with no abstract methods in it? - Yes &lt;br /&gt;1. Can an Interface be final? - No &lt;br /&gt;What are local variables? &lt;br /&gt;Local variables are those which are declared within a block of code like methods. Local variables should be initialized before accessing them. &lt;br /&gt;Can an Interface have an inner class? - Yes.  &lt;br /&gt;public interface xyz{&lt;br /&gt;  static int i=0;&lt;br /&gt;  void ss();&lt;br /&gt;&lt;br /&gt;  class abc{&lt;br /&gt;   abc(){&lt;br /&gt;    int j;&lt;br /&gt;    System.out.println("In side the interface");&lt;br /&gt;   };&lt;br /&gt;&lt;br /&gt;   public static void main(String abc[]){&lt;br /&gt;    System.out.println("Interface is in");&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;Can we define private and protected modifiers for variables in interfaces? - No &lt;br /&gt;What modifiers are allowed for methods in an Interface? - Only public and abstract modifiers are allowed for methods in interfaces. &lt;br /&gt;What is a local, member and a class variable? - Which variable declared within a method that is called “local” variables, which variable declared within the class (not within any methods) are called “member” variables (global variables) and which variables declared within the class (not within any methods and are defined as “static”) are called class variables.&lt;br /&gt;What are the different identifier states of a Thread? - The different identifiers of a Thread are: R - Running or runnable thread, S - Suspended thread, CW - Thread waiting on a condition variable, MW - Thread waiting on a monitor lock, MS - Thread suspended waiting on a monitor lock &lt;br /&gt;What are some alternatives to inheritance? - Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often better than inheritance because it forces you to think about each message you forward, because the instance is of a known class, rather than a new class, and because it doesn’t force you to accept all the methods of the super class: you can provide only the methods that really make sense. On the other hand, it makes you write more code, and it is more difficult to re-use (because it is not a subclass). &lt;br /&gt;What is instance variables? &lt;br /&gt;Instance variables are those variable which is defined at the class level. Instance variables need not be initialized before using them as they are automatically initialized to their default values.&lt;br /&gt;What is constant variable in Java? &lt;br /&gt;The constant variable should be declared as static and final. So only one copy of the variable exists for all instances of the class and the value can't be changed.&lt;br /&gt;Should a main method be mandatory declared in all java classes?&lt;br /&gt;No it is not required. main method should be defined only if the source class is a java application.&lt;br /&gt;What is the return type of the main method?&lt;br /&gt;Main method doesn't return anything therefore it declared void.&lt;br /&gt;Why is the main method declared static?&lt;br /&gt;main method is called by the JVM yet before the instantiation of the class hence it is declared as static.&lt;br /&gt;What is the argument of main method?&lt;br /&gt;The main method accepts an array type of String object as an argument.&lt;br /&gt;Can main method be overloaded? &lt;br /&gt;Yes. You can have any number of main methods with different method signature and implementation in the class.&lt;br /&gt;Can a main method be declared final? &lt;br /&gt;Yes. Any inheriting class will not be able to have it's own default main method.&lt;br /&gt;Why isn’t there operator overloading? - Because C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn’t even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note that some of the classes like DataOutputStream have unoverloaded methods like writeInt() and writeByte(). &lt;br /&gt;How do I convert a numeric IP address like 192.168.10.204 into a hostname like javasks.blogspot.com? &lt;br /&gt; String hostname = InetAddress.getByName("192.168.10.204").getHostName();&lt;br /&gt;Why do threads block on I/O? - Threads block on I/O (that is enters in the waiting state) so that other threads may execute while the I/O operation is performed.&lt;br /&gt;What is synchronization and why is it important? - With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object’s value. This often leads to significant errors. &lt;br /&gt;Is null a keyword? - No, The null value is not a keyword. &lt;br /&gt;How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? - Unicode requires 16 bits and ASCII require 7 bits. while the ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and larger bit patterns. &lt;br /&gt;What are wrapped classes? - Wrapped classes are classes that allow primitive types to be accessed as objects. &lt;br /&gt;What is a native method? - A native method is a method that is implemented in a language other than Java. &lt;br /&gt;What is the catch or declare rule for method declarations? - If a checked exception may be thrown within the body of a method, the method must either catch the exception or declare it in its throws clause. &lt;br /&gt;What is the range of the char type? - The range of the char type is 0 to 2^16 - 1. &lt;br /&gt;------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JSP&lt;br /&gt;&lt;br /&gt;What is JSP and why it used in java? &lt;br /&gt;JSP is a framework which is the part of MVC model, it stand for view which show on the front end of the application, it is a normally HTML pages with Java code pieces embedded in them. JSP pages are saved to *.jsp files. A JSP compiler is used in the background to generate a Servlet from the JSP page.&lt;br /&gt;Differentiate between &lt;jsp:forward page = ... &gt; and response.sendRedirect(url),?. &lt;br /&gt; The &lt;jsp:forward&gt; element forwards the request object holding the client request information from one JSP file to another file. &lt;br /&gt;sendRedirect sends HTTP temporary redirect response to the browser, and browser creates a new request to go the redirected page. &lt;br /&gt;Differentiate between custom JSP tags and beans? &lt;br /&gt;Custom JSP tag is a tag you defined. To use custom JSP tags, you need to define three things:&lt;br /&gt;1. The tag handler class that specifies the tag\'s behavior &lt;br /&gt;2. The tag library descriptor file that maps the XML element names &lt;br /&gt;3. the JSP file that uses the tag library &lt;br /&gt;JavaBeans are Java utility classes you defined.&lt;br /&gt;to declare a bean and use&lt;br /&gt;to set value of the bean class and use&lt;br /&gt;to get value of the bean class.&lt;br /&gt;What are comments in JSP?&lt;br /&gt; 1: &lt;%-- JSP Comment --%&gt;&lt;br /&gt; 2: &lt;!-- HTML Comment --&gt;&lt;br /&gt; 3: &lt;% // Java comments %&gt;&lt;br /&gt; 4: &lt;% /* Java comments*/  %&gt;&lt;br /&gt;What is JSP technology? &lt;br /&gt;JSP is a standard Java extension that is defined on top of the servlet Extensions. The goal of JSP is the simplified creation and management of dynamic Web pages.&lt;br /&gt; What is JSP page? &lt;br /&gt;A text-based document that contains two types of text: static template data, which can be showed in any text-based format such as HTML, SVG, WML, and XML, and JSP elements, which construct dynamic content.&lt;br /&gt;Describe implicit objects? &lt;br /&gt;Implicit objects are objects that are created by the web container and contain information related to a particular request, page, or application. They are:&lt;br /&gt;* request&lt;br /&gt;* response&lt;br /&gt;* pageContext&lt;br /&gt;* session&lt;br /&gt;* application&lt;br /&gt;* out&lt;br /&gt;* config&lt;br /&gt;* page&lt;br /&gt;* exception &lt;br /&gt;How many JSP scripting elements and what are they? &lt;br /&gt;There are three scripting language elements:&lt;br /&gt;*declarations&lt;br /&gt;*scriptlets&lt;br /&gt;*expressions &lt;br /&gt;Why are JSP pages the preferred API for creating a web-based client program? &lt;br /&gt;Because no plug-ins or security policy files are needed on the client systems(applet does). &lt;br /&gt;Differentiate between &lt;jsp:include page = ... &gt; and  &lt;%@ include file = ... &gt;?. &lt;br /&gt;&lt;jsp:include page = ... &gt;: This is like a function call from one jsp to another jsp.&lt;br /&gt;&lt;%@ include file = ... &gt;: . In this case in the included file changes, the changed content will not included in the output. This approach is used when the code from one jsp file required to include in multiple jsp files. &lt;br /&gt;Is JSP is extensible technology? &lt;br /&gt;YES. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries.&lt;br /&gt; Can we use the constructor, instead of init(), to initialize servlet? &lt;br /&gt;Yes , of course we can use the constructor instead of init(). The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with arguments, so there was no way to give the constructur a ServletConfig.&lt;br /&gt; How can a servlet refresh automatically if some new data has entered the database? &lt;br /&gt;You can apply a client-side Refresh or Server Push.&lt;br /&gt; The code in a finally clause will never fail to execute, right? &lt;br /&gt;Using System.exit(1); in try block will not allow finally code to execute.&lt;br /&gt; How many messaging models do JMS provide for and what are they? &lt;br /&gt;JMS provide for two messaging models, &lt;br /&gt;1:publish-and-subscribe and &lt;br /&gt;2:point-to-point queuing.&lt;br /&gt; What type of information is needed to create a TCP Socket? &lt;br /&gt;The Local Systems IP Address and Port Number. And the Remote System’s IPAddress and Port Number.&lt;br /&gt; What Class.forName will do while loading drivers? &lt;br /&gt;It is used to create an instance of a driver and register it with the DriverManager. &lt;br /&gt;How to Retrieve Warnings? &lt;br /&gt; A warning can be reported on a Connection object, a Statement object (including PreparedStatement and CallableStatement objects), or a ResultSet object. Each of these classes has a getWarnings method, which you must invoke in order to see the first warning reported on the calling object.&lt;br /&gt;How many types of JSP scripting elements are there and what are they? &lt;br /&gt;There are three scripting language elements: &lt;br /&gt;declarations, scriptlets and expressions.&lt;br /&gt; In the Servlet 2.4 specification SingleThreadModel has been deprecated, why? &lt;br /&gt;Because it is not practical to have such model. Whether you set isThreadSafe to true or false, you should take care of concurrent client requests to the JSP page by synchronizing access to any shared objects defined at the page level.&lt;br /&gt; What are stored procedures? How is it useful? &lt;br /&gt;"A stored procedure is a set of statements/commands which reside in the database".  The biggest advantage is of course speed. Also certain kind of data manipulations are not achieved in SQL. Stored procs provide a mechanism to do these manipulations. Stored procs are also useful when you want to do Batch updates/exports/houseKeeping kind of stuff on the database.&lt;br /&gt; How do I include static files within a JSP page? &lt;br /&gt;Static resources should always be admitted using the JSP include directive. This way, the inclusion is performed just once during the translation phase. Note that you should always supply a relative URL for the file attribute. Although you can also include static resources using the action, this is not advisable as the inclusion is then performed for each and every request.&lt;br /&gt; Why does JComponent have add() and remove() methods but Component does not? &lt;br /&gt;because JComponent is a subclass of Container, and can contain other components and jcomponents.&lt;br /&gt;How can I implement a thread-safe JSP page?&lt;br /&gt; This is done by adding the directive &lt;%@ page isThreadSafe="false" % &gt; within your JSP page.&lt;br /&gt;If the browser has disabled cookies.  How can we enable session tracking for JSP pages ?&lt;br /&gt;We know that session tracking uses cookies by default to associate a session identifier with a unique user. If the browser does not support cookies, or if cookies are disabled, you can still enable session tracking using URL rewriting. URL rewriting essentially includes the session ID within the link itself as a name/value pair.&lt;br /&gt;What is a output comment? &lt;br /&gt; The JSP engine handles an output comment as uninterrupted HTML text, returning the comment in the HTML output sent to the client. You can see the comment by viewing the page source from your Web browser. &lt;br /&gt;What is a Hidden Comment? &lt;br /&gt;A comments that documents the JSP page but is not sent to the client. The JSP engine ignores a hidden comment, and does not process any code within hidden comment tags.&lt;br /&gt;JSP Syntax &lt;br /&gt;&lt;%-- comment --%&gt; &lt;br /&gt;What is a Declaration &lt;br /&gt;A declaration declares one or more variables or methods for use later in the JSP source file. A declaration must contain at least one complete declarative statement. You can declare any number of variables or methods within one declaration tag, as long as they are separated by semicolons.  &lt;%! declarations %&gt;&lt;br /&gt;&lt;%! int i = 0; %&gt; &lt;%! int a, b, c; %&gt; &lt;br /&gt;What is a Scriptlet &lt;br /&gt;A scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language.Within scriptlet tags, you can &lt;br /&gt;1.Declare variables or methods &lt;br /&gt;2.Write expressions valid in the page scripting language &lt;br /&gt;3.Use any of the JSP implicit objects &lt;br /&gt;What are implicit objects? List them? &lt;br /&gt;Certain objects that are available for the use in JSP documents without being declared first. These objects are parsed by the JSP engine and inserted into the generated servlet. &lt;br /&gt;Difference between forward and sendRedirect? &lt;br /&gt; When a sendRedirtect method is invoked, it causes the web container to return to the browser indicating that a new URL should be requested. Because the browser issues a completly new request any object that are stored as request attributes before the redirect occurs will be lost. This extra round trip a redirect is slower than forward. &lt;br /&gt;What are the different scope values for the &lt;jsp:useBean&gt;? &lt;br /&gt;The four different scope values for &lt;jsp:useBean&gt; are &lt;br /&gt;1. page &lt;br /&gt;2. request &lt;br /&gt;3.session &lt;br /&gt;4.application &lt;br /&gt;Explain the life-cycle mehtods in JSP? &lt;br /&gt; The JspPage interface declares only two mehtods - jspInit() and jspDestroy() that must be implemented by all JSP pages regardless of the client-server protocol. However the JSP specification has provided the HttpJspPage interfaec specifically for the JSp pages serving HTTP requests. This interface declares one method _jspService(). The jspInit()- The container calls the jspInit() to initialize the servlet instance.It is called before any other method, and is called only once for a servlet instance. The jspservice()- The container calls the _jspservice() for each request, passing it the request and the response objects. The jspDestroy()- The container calls this when it decides take the instance out of service. It is the last method called n the servlet instance.&lt;br /&gt;---------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;JDBC&lt;br /&gt;How can you establish connection?&lt;br /&gt;To establish a connection you need to have the appropriate driver connect to the DBMS.&lt;br /&gt;The following line of code we use:&lt;br /&gt;String url = “jdbc:odbc:Fred”;&lt;br /&gt;Connection con = DriverManager.getConnection(url, “Fernanda”, “J8?); &lt;br /&gt;Define different types of Statements?&lt;br /&gt;There are three types of statements &lt;br /&gt;• Regular statement&lt;br /&gt;• prepared statement &lt;br /&gt;• callable statement &lt;br /&gt;What are the components of JDBC? &lt;br /&gt;The two major components of JDBC are Connection Pooling and Data Sources.&lt;br /&gt;Define metadata? &lt;br /&gt;Metadata is data about data.&lt;br /&gt;In JDBC, there are  two types&lt;br /&gt;1. Describing information about the Result set object. i&lt;br /&gt;2. describes about the database connection&lt;br /&gt;Differentiate between local and global transaction?&lt;br /&gt;A transaction is atomic unit of Work.&lt;br /&gt;Transactions can be divided into two categories.&lt;br /&gt;1.Local Transactions: These transactions are confined to the objects which reside inside one particular JVM.&lt;br /&gt;2.Global Transactions:These transactions may encapsulate objects which are distributed on various JVM's.&lt;br /&gt;What is the technique to call a Stored Procedure from JDBC? &lt;br /&gt;The first step is to create a  CallableStatement object. As with as a Statement an and PreparedStatement objects, this is done with an open Connection object.&lt;br /&gt;E.g.CallableStatement cs = con.prepareCall("{call SHOW_SUPPLIERS}");&lt;br /&gt;ResultSet rs = cs.executeQuery();&lt;br /&gt;Why JDBC objects generate SQLWarnings? &lt;br /&gt; Connections, Statements and ResultSets all have a getWarnings method that allows retrival.The  prior ResultSet warnings are cleared on each new read and prior Statement warnings are cleared with each new execution.&lt;br /&gt;What are the components of JDBC? &lt;br /&gt;The two  major components of JDBC is One  implementation interface for the database manufacturers, the other implementation interface for application and applet writers. &lt;br /&gt;How web server is connected with appliction server?&lt;br /&gt;All the application server requires to the  information about the installed web server's port and name, through these entries it creates a connector and stored. This connector is used to communicate with Application server.&lt;br /&gt;Differentiate between  Rowset  and  Resultset?&lt;br /&gt;RowSets  are a  part of JDBC 2.0 API. Essentially a row set is a JavaBean that contains database data. The implementation is  store the data offline, or it can simply wrap a connection to make a result set look like a JavaBean. You could even use a row set to access data communicating over HTTP to a servlet, which provides the data for the bean.&lt;br /&gt;How can we insert images into a Mysql database?&lt;br /&gt;This code is  snip shows  the basics:&lt;br /&gt;File file = new File(fPICTURE);&lt;br /&gt;FileInputStream fis = new FileInputStream(file);&lt;br /&gt;PreparedStatement ps =&lt;br /&gt;ConrsIn.prepareStatement("insert into dbPICTURE values (?,?)");&lt;br /&gt;ps.setString(1,file.getName());&lt;br /&gt;ps.setBinaryStream(2,fis,(int)file.length());&lt;br /&gt;ps.close();&lt;br /&gt;fis.close();&lt;br /&gt;Define advantage of using a PreparedStatement? &lt;br /&gt;For  SQL statements that are executed repeatedly, using a PreparedStatement object would almost always be s  faster than using a Statement object. This is because creating a PreparedStatement object by explicitly giving the SQL statement causes the statement to be precompiled within the database immediately. &lt;br /&gt;Typically, PreparedStatement objects are used for the SQL statements that take parameters. &lt;br /&gt;How does the JDBC work? &lt;br /&gt;The Java Database Connectivity (JDBC) is used to whenever a Java application should communicate with a relational database for which a JDBC driver exists.&lt;br /&gt;Main JDBC classes:&lt;br /&gt;• DriverManager. Manages a list of database drivers. &lt;br /&gt;• Driver. The database communications link, handling all communication with the database. &lt;br /&gt;• Connection. Interface with all the methods for contacting a database&lt;br /&gt;• Statement. Encapsulates an SQL statement which is passed to the database to be parsed, compiled, planned and executed.&lt;br /&gt;• ResultSet. The answer/result from a statement. A ResultSet is a fancy 2D list which encapsulates all outgoing results from a given SQL query. &lt;br /&gt;--------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MySQL&lt;br /&gt;What is Primary Key? &lt;br /&gt;A primary key is a single column or multiple columns is defined to have unique values that can be used as a row identifications. &lt;br /&gt;What is Transaction? &lt;br /&gt;MySQL server is  introduced the transaction concept to allow users to group one or more SQL statements into a single transaction, so that the effects of all the SQL statements in a transaction can be either all committed or all rolled back. A transaction is a logical unit of work requested by a user to be applied to the database objects.&lt;br /&gt;What are  the indexes?&lt;br /&gt;An index is an internal structure which is provided  quick access to rows of a table based on the values of more than one columns.&lt;br /&gt;What is  a foreign key?&lt;br /&gt;A foreign key  is a constraint associates one or more columns in a table with an identical set of columns on which a primary key has been defined in another table. A foreign key may refer to the primary key of another table or same table.&lt;br /&gt;What is the advantages of MySQL against oracle?&lt;br /&gt;MySQL are  many advantages in comparison to Oracle.&lt;br /&gt;• MySQL is Open a source, which can be available any time &lt;br /&gt;• MySQL has no cost of development purpose. &lt;br /&gt;• MySQL has most of features , which oracle provides &lt;br /&gt;• MySQL day by day updating with the new facilities. &lt;br /&gt;• Good for small application. &lt;br /&gt;• Easy to learn and to become master. &lt;br /&gt;• MySQL has a good power these days. &lt;br /&gt;-------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Servlet&lt;br /&gt;Question: What are the lifecycle methods of Servlet?&lt;br /&gt;Answer: The interface javax.servlet.Servlet,  defines the three life-cycle methods. These are:&lt;br /&gt;public void init(ServletConfig config) throws ServletException&lt;br /&gt;public void service( ServletRequest req, ServletResponse res) throws ServletException, IOException&lt;br /&gt;public void destroy()&lt;br /&gt;The container manages the lifecycle of the Servlet. When a new request come to a Servlet, the container performs the following steps.&lt;br /&gt;1. If an instance of the servlet does not exist, the web container&lt;br /&gt;    * Loads the servlet class.&lt;br /&gt;    * Creates an instance of the servlet class.&lt;br /&gt;    * Initializes the servlet instance by calling the init method. Initialization is covered in Initializing a Servlet.&lt;br /&gt;2. The container invokes the service method, passing request and response objects.&lt;br /&gt;3. To remove the servlet, container finalizes the servlet by calling the servlet's destroy method.&lt;br /&gt;Question: What are the type of protocols supported by HttpServlet?&lt;br /&gt;Answer: It extends the GenericServlet base class and provides an framework for handling the HTTP protocol. So, HttpServlet only supports HTTP and HTTPS protocol.&lt;br /&gt;Question: What are the directory Structure of Web Application?&lt;br /&gt;Answer: Web component follows the standard directory structure defined in the J2EE specification. &lt;br /&gt;Directory Structure of Web Component&lt;br /&gt; /&lt;br /&gt;   index.htm, JSP, Images etc..&lt;br /&gt;   Web-inf&lt;br /&gt;&lt;br /&gt;   web.xml&lt;br /&gt;    classes&lt;br /&gt;&lt;br /&gt;         servlet classes&lt;br /&gt;    lib&lt;br /&gt;&lt;br /&gt;         jar files&lt;br /&gt;Question: What is ServletContext?&lt;br /&gt;Answer: ServletContext is an Interface that defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file. There is one context per "web application" per Java Virtual Machine. (A "web application" is a collection of servlets and content installed under a specific subset of the server's URL namespace such as /catalog and possibly installed via a .war file.)&lt;br /&gt;Question: What is meant by Pre-initialization of Servlet?&lt;br /&gt;Answer: When servlet container is loaded, all the servlets defined in the web.xml file does not initialized by default. But the container receives the request it loads the servlet. But in some cases if you want your servlet to be initialized when context is loaded, you have to use a concept called pre-initialization of Servlet. In case of Pre-initialization, the servlet is loaded when context is loaded. You can specify &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;&lt;br /&gt;in between the &lt;servlet&gt;&lt;/servlet&gt; tag.&lt;br /&gt;Question: What mechanisms are used by a Servlet Container to maintain session information?&lt;br /&gt;Answer: Servlet Container uses Cookies, URL rewriting, and HTTPS protocol information to maintain the session.&lt;br /&gt;Question: What do you understand by servlet mapping?&lt;br /&gt;Answer: Servlet mapping defines an association between a URL pattern and a servlet. You can use one servlet to process a number of url pattern (request pattern). For example in case of Struts *.do url patterns are processed by Struts Controller Servlet.&lt;br /&gt;Question: What must be implemented by all Servlets?&lt;br /&gt;Answer: The Servlet Interface must be implemented by all servlets.&lt;br /&gt;Question: What are the differences between Servlet and Applet?&lt;br /&gt;Answer: Servlets are server side components that runs on the Servlet container. Applets are client side components and runs on the web browsers. Servlets have no GUI interface.&lt;br /&gt;Question: What are the uses of Servlets?&lt;br /&gt;Answer: * Servlets are used to process the client request.&lt;br /&gt;               * A Servlet can handle multiple request concurrently and be used to develop high performance system&lt;br /&gt;               * A Servlet can be used to load balance among serveral servers, as Servlet can easily forward request.&lt;br /&gt;Question:  What are the objects that are received when a servlets accepts call from client? &lt;br /&gt;Answer: The objects are ServeltRequest  and ServletResponse . The ServeltRequest encapsulates the communication from the client to the&lt;br /&gt;server. While ServletResponse encapsulates the communication from the Servlet back to the client.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-7061416699225646839?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/7061416699225646839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/07/saigun-technology-pvt-ltd-written-test.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7061416699225646839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7061416699225646839'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/07/saigun-technology-pvt-ltd-written-test.html' title='Saigun Technology Pvt. Ltd. Written test paper and interview questions with answers'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-6263341947963938896</id><published>2009-07-04T04:56:00.000-07:00</published><updated>2009-07-04T05:00:13.447-07:00</updated><title type='text'>Jobs In Various Sector</title><content type='html'>INDIAN AIR FORCE&lt;br /&gt;Many in India  Airman Group 'Y' August 2009 Entry Intermediate/10+2/ Equivalent examination 05-Jun  &lt;br /&gt;&lt;br /&gt;MAZAGON DOCK LIMITED&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;THE INDIAN NAVY&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RITES LIMITED&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;AllBank Finance Limited&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;UCO BANK   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DRDO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;INDIAN NAVY&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ISRO&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Assistant Commandant (UPSC)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;RRB Ajmer&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;INDIAN NAVY&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;INDIAN NAVY&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Go Through the Link: &lt;a href="http://www.govtjob.350.com/"&gt;http://www.govtjob.350.com/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-6263341947963938896?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/6263341947963938896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/07/jobs-in-various-sector.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6263341947963938896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6263341947963938896'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/07/jobs-in-various-sector.html' title='Jobs In Various Sector'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4375417171549647388</id><published>2009-06-17T00:48:00.000-07:00</published><updated>2009-06-17T00:56:20.171-07:00</updated><title type='text'>Bank Clerical Exams Model Test Papers, 2004</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Test I &amp;amp; II :  Reasoning ability and Numerical Aptitude&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Suresh is taller than Prabhu but shorter than Ram, Prabhu&lt;br /&gt; is as tall as Neeraj but taller than Nilesh.  Which of the&lt;br /&gt; following statements is definitely true for Neeraj?&lt;br /&gt; (a) Neeraj is shorter than Nilesh&lt;br /&gt; (b) Neeraj is the tallest&lt;br /&gt; (c) Neeraj is the shortest&lt;br /&gt; (d) Neeraj is taller than Nilesh&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  Neeraj is taller than Nilesh&lt;br /&gt;  &lt;br /&gt;2. How many such pairs of letters are there in the word&lt;br /&gt; STAINLESS each of which has as many letters between them in&lt;br /&gt; the word as they have in the English alphabet, in the same&lt;br /&gt; sequence?&lt;br /&gt; (a) Two&lt;br /&gt; (b) Three&lt;br /&gt; (c) Four&lt;br /&gt; (d) Five&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( e )  None of these&lt;br /&gt;  &lt;br /&gt;3. What will come in place of the question mark (?) in the&lt;br /&gt; following sequence?&lt;br /&gt; ARRANGEMENTS, RRANGEMENT, RANGEMEN, ?, NGEM&lt;br /&gt; (a) RANGEME&lt;br /&gt; (b) ANGEME&lt;br /&gt; (c) ANGEMENT&lt;br /&gt; (d) NGEMEN&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  ANGEME&lt;br /&gt;  &lt;br /&gt;4. Four of the following five are alike in a certain way and&lt;br /&gt; so form a group.  Which is the one that does not belong to&lt;br /&gt; that group?&lt;br /&gt; (a) Baking&lt;br /&gt; (b) Steaming&lt;br /&gt; (c) Cooking&lt;br /&gt; (d) Frying&lt;br /&gt; (e) Boiling&lt;br /&gt; Ans: ( c )  Cooking&lt;br /&gt;  &lt;br /&gt;5. Four of the following five are alike in a certain way and&lt;br /&gt; so form a group which is the one that does not belong to&lt;br /&gt; that group?&lt;br /&gt; (a) Radish&lt;br /&gt; (b) Orange&lt;br /&gt; (c) Pear&lt;br /&gt; (d) Mango&lt;br /&gt; (e) Apple&lt;br /&gt; Ans: ( a )  Radish&lt;br /&gt;  &lt;br /&gt;6. Four of the following five are alike in a certain way and&lt;br /&gt; so form a group.  Which is the one that does not belong to&lt;br /&gt; that group?&lt;br /&gt; (a) Earth&lt;br /&gt; (b) Moon&lt;br /&gt; (c) Saturn&lt;br /&gt; (d) Pluto&lt;br /&gt; (e) Venus&lt;br /&gt; Ans: ( b )  Moon&lt;br /&gt;  &lt;br /&gt;7. If water is called food, food is called drink, drink is&lt;br /&gt; called blue, blue is called red, red is called white and&lt;br /&gt; white is called brown, then what is the colour of ?blood? ?&lt;br /&gt; (a) Blue&lt;br /&gt; (b) Red&lt;br /&gt; (c) Brown&lt;br /&gt; (d) White&lt;br /&gt; (e) Drink&lt;br /&gt; Ans: ( d )  White&lt;br /&gt;  &lt;br /&gt;8. In a certain code language, the word ENQUIRY is written&lt;br /&gt; as YRIUQNE.   How will the word REQUIRE be written in the&lt;br /&gt; code language ?&lt;br /&gt; (a) QERUERI&lt;br /&gt; (b) REQUERI&lt;br /&gt; (c) ERIUQER&lt;br /&gt; (d) IREUQER&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  ERIUQER&lt;br /&gt;  &lt;br /&gt;9. In a certain code language DESERT is written RTSEDE.  How&lt;br /&gt; will the word FAULTS the written in that code language?&lt;br /&gt; (a) TSULFA&lt;br /&gt; (b) AFLUST&lt;br /&gt; (c) LUAFST&lt;br /&gt; (d) UAFSTL&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  TSULFA&lt;br /&gt;  &lt;br /&gt;10. How many meaningful English word can be formed by using&lt;br /&gt; the second, the fifth, the seventh and the tenth letters of&lt;br /&gt; the word APPROPRIATION, each only once, but in different&lt;br /&gt; sequence ?&lt;br /&gt; (a) One&lt;br /&gt; (b) Two&lt;br /&gt; (c) Three&lt;br /&gt; (d) None of these&lt;br /&gt; (e) More than three&lt;br /&gt; Ans: ( a )  One&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 11?15) :What will come in place of the question mark (?) in the following questions?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;11. 7589 ? ? = 3434 &lt;br /&gt; (a) 3721&lt;br /&gt; (b) 4155&lt;br /&gt; (c) 3246&lt;br /&gt; (d) 11023&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  4155&lt;br /&gt;  &lt;br /&gt;12. 300 + (10)2 x 2 = ?&lt;br /&gt; (a) 450&lt;br /&gt; (b) 800&lt;br /&gt; (c) 500&lt;br /&gt; (d) 550&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  500&lt;br /&gt;  &lt;br /&gt;13. 12.05 x 5.4 ÷ 0.6 = ?&lt;br /&gt; (a) 105.55&lt;br /&gt; (b) 108.45&lt;br /&gt; (c) 118.45&lt;br /&gt; (d) 118.55&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  108.45&lt;br /&gt;  &lt;br /&gt;14. 2435 ÷ 24 = 24?&lt;br /&gt; (a) 2.5&lt;br /&gt; (b) 3.5&lt;br /&gt; (c) 2&lt;br /&gt; (d) 3&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  2.5&lt;br /&gt;  &lt;br /&gt;15. 78 x 14 + 7645 ? ? = 8247&lt;br /&gt; (a) 580&lt;br /&gt; (b) 590&lt;br /&gt; (c) 490&lt;br /&gt; (d) 480&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  490&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 16?17) : &lt;br /&gt;I. ?P + Q? means P is the brother of Q&lt;br /&gt;II. ?P x Q? means P is the mother of Q&lt;br /&gt;III. ?P ÷ Q? means P is the sister of Q&lt;br /&gt;IV. ?P ? Q? means Q is the father of P&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;16. Which of the following represents ?B is the material&lt;br /&gt; uncle of C??&lt;br /&gt; (a) B + A x C&lt;br /&gt; (b) B x C + A&lt;br /&gt; (c) B ÷ C + A&lt;br /&gt; (d) B x A + c&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  B + A x C&lt;br /&gt;  &lt;br /&gt;17. Which of the following statements is not necessary to&lt;br /&gt; answer the above question?&lt;br /&gt; (a) Only I and II&lt;br /&gt; (b) Only III&lt;br /&gt; (c) Only III and IV&lt;br /&gt; (d) Either II or III&lt;br /&gt; (e) All are necessary&lt;br /&gt; Ans: ( c )  Only III and IV&lt;br /&gt;  &lt;br /&gt;18. Pointing towards a woman a boy said, ?she is the only&lt;br /&gt; daughter of my mother?s brother?s only brother-in-law?.  How&lt;br /&gt; the woman is related to the boy?&lt;br /&gt; (a) Mother&lt;br /&gt; (b) Aunt&lt;br /&gt; (c) Sister-in-law&lt;br /&gt; (d) Sister&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  Sister&lt;br /&gt;  &lt;br /&gt;19. Four of the following five are alike in a certain way&lt;br /&gt; and hence form a group.  Which one of the following does not&lt;br /&gt; belong to that group?&lt;br /&gt; (a) 63&lt;br /&gt; (b) 64&lt;br /&gt; (c) 39&lt;br /&gt; (d) 48&lt;br /&gt; (e) 79&lt;br /&gt; Ans: ( e )  79&lt;br /&gt;  &lt;br /&gt;20. Ina certain code language DOWNBEAT is written as&lt;br /&gt; TABEWNDO.  How will the word PROSPECT be written in that&lt;br /&gt; code language?&lt;br /&gt; (a) RPSOEPTC&lt;br /&gt; (b) TCPEOSPR&lt;br /&gt; (c) ORPSPTCE&lt;br /&gt; (d) TCPREPOS&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  TCPEOSPR&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 21?26) : What will come in place of the&lt;br /&gt;question mark (?) in the following questions?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;21. 37.5 ÷ (27)1.5 x 92 = 3?&lt;br /&gt; (a) 5&lt;br /&gt; (b) 4.5&lt;br /&gt; (c) 7&lt;br /&gt; (d) 6.5&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  7&lt;br /&gt;  &lt;br /&gt;22. 28% of 450 + 45% of 280 = ?&lt;br /&gt; (a) 126&lt;br /&gt; (b) 252&lt;br /&gt; (c) 324&lt;br /&gt; (d) 212&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  252&lt;br /&gt;  &lt;br /&gt;23. 1027.05 ? 314.005 + 112.25 = ?&lt;br /&gt; (a) 825.395&lt;br /&gt; (b) 825.095&lt;br /&gt; (c) 825.305&lt;br /&gt; (d) 825.295&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  825.295&lt;br /&gt;  &lt;br /&gt;24. (103.7 x 101.3)2 = 10?&lt;br /&gt; (a) 6&lt;br /&gt; (b) 7&lt;br /&gt; (c) 10&lt;br /&gt; (d) 3&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  10&lt;br /&gt;  &lt;br /&gt;25. 40.83 x 1.02 x 1.2 = ?&lt;br /&gt; (a) 49.97592&lt;br /&gt; (b) 41.64660&lt;br /&gt; (c) 58.7952&lt;br /&gt; (d) 42.479532&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  49.97592&lt;br /&gt;  &lt;br /&gt;26. 3978 + 112 x 2 = ? ÷ 2&lt;br /&gt; (a) 8180&lt;br /&gt; (b) 2101&lt;br /&gt; (c) 4090&lt;br /&gt; (d) 8404&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  8404&lt;br /&gt;  &lt;br /&gt;27. Four of the following five are alike in a certain way&lt;br /&gt; and hence form a group.  Which one of the following does not&lt;br /&gt; belong to that group?&lt;br /&gt; (a) 21&lt;br /&gt; (b) 35&lt;br /&gt; (c) 49&lt;br /&gt; (d) 63&lt;br /&gt; (e) 56&lt;br /&gt; Ans: ( c )  49&lt;br /&gt;  &lt;br /&gt;28. P is heavier than Q but lighter than R.  Q is heavier&lt;br /&gt; than T.  S is heavier than P but lighter than V.  Who among&lt;br /&gt; them is the lightest?&lt;br /&gt; (a) V&lt;br /&gt; (b) S&lt;br /&gt; (c) T&lt;br /&gt; (d) R&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  T&lt;br /&gt;  &lt;br /&gt;29. In a certain code language TRANSPORT is written as&lt;br /&gt; RTASNPORT.  How will the word GATEHOUSE be written in that&lt;br /&gt; code language ?&lt;br /&gt; (a) ETGAHOESU&lt;br /&gt; (b) ETAGHESUO&lt;br /&gt; (c) AGTHEOUSE&lt;br /&gt; (d) AGETHUOES&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  AGTHEOUSE&lt;br /&gt;  &lt;br /&gt;30. In a certain code language ?si re ga? MEANS ?Shyam is&lt;br /&gt; smart? and ?pa si ga? means? Animesh is smart?.  What is the&lt;br /&gt; code for ?smart? in that code language?&lt;br /&gt; (a) si&lt;br /&gt; (b) re&lt;br /&gt; (c) ga&lt;br /&gt; (d) pa&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( e )  None of these&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 31?34) : What will come in place of the&lt;br /&gt;question-mark (?) in the following questions ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;31. 12.05 x 5.4 ÷ 0.3 = ?&lt;br /&gt; (a) 108.55&lt;br /&gt; (b) 216.90&lt;br /&gt; (c) 118.45&lt;br /&gt; (d) 118.55&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  216.90&lt;br /&gt;  &lt;br /&gt;32. 99 ÷ 11 + 7 x 16 = (?)2&lt;br /&gt; (a) 11&lt;br /&gt; (b) 121&lt;br /&gt; (c) 12&lt;br /&gt; (d) 144&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  11&lt;br /&gt;  &lt;br /&gt;33. 8400 ÷ 120 x 15 + 150 = ?&lt;br /&gt; (a) 1050&lt;br /&gt; (b) 1200&lt;br /&gt; (c) 1100&lt;br /&gt; (d) 1514&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  1200&lt;br /&gt;  &lt;br /&gt;34. 45% of 1500 + 35% of 1700 = ?% of 3175&lt;br /&gt; (a) 40&lt;br /&gt; (b) 55&lt;br /&gt; (c) 45&lt;br /&gt; (d) 35&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  40&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions  (Qs. 35?39) : Study the following information&lt;br /&gt;carefully and answer the questions given below:&lt;br /&gt;The number 0 to 9 are coded in the following manner&lt;br /&gt;considering the exception given below:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3 6 9 7 0 2 8 1 5 4&lt;br /&gt;H P V S G D J K M R&lt;br /&gt;.&lt;br /&gt;Exception 1:If a number starts and ends with non-zero odd&lt;br /&gt;number then the first and the last digits should be coded as&lt;br /&gt;X and Z.&lt;br /&gt;Exception 2:If a number starts and ends with non-zero even&lt;br /&gt;number then the first and the last digits should be coded as&lt;br /&gt;A and B respectively.&lt;br /&gt;&lt;br /&gt;35. What is the code for 5 2 1 8 6 3 ?&lt;br /&gt; (a) MDKJPH&lt;br /&gt; (b) ZDKJPX&lt;br /&gt; (c) XDKJPZ&lt;br /&gt; (d) ADKJPB&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  XDKJPZ&lt;br /&gt;  &lt;br /&gt;36. What is the code for 492310 ?&lt;br /&gt; (a) RVDHKG&lt;br /&gt; (b) AVDHKB&lt;br /&gt; (c) VRDKHG&lt;br /&gt; (d) BVDHKA&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  RVDHKG&lt;br /&gt;  &lt;br /&gt;37. Which of the following numbers is represented by ASGHKB?&lt;br /&gt; I.  670312  II.  470313  III.  270318&lt;br /&gt; (a) Only I and III&lt;br /&gt; (b) Only I and II&lt;br /&gt; (c) Only Ii and III&lt;br /&gt; (d) Only I&lt;br /&gt; (e) Only III&lt;br /&gt; Ans: ( a )  Only I and III&lt;br /&gt;  &lt;br /&gt;38. What is the code for 3186452 ?&lt;br /&gt; (a) HKJDMRP&lt;br /&gt; (b) KHPJMRD&lt;br /&gt; (c) DMRPHKJ&lt;br /&gt; (d) HKJPRMD&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  HKJPRMD&lt;br /&gt;  &lt;br /&gt;39. Which of the following numbers is represented by DPJRSV ?&lt;br /&gt; (a) 628794&lt;br /&gt; (b) 268479&lt;br /&gt; (c) 246793&lt;br /&gt; (d) 168359&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  268479&lt;br /&gt;  &lt;br /&gt;40. Animesh and Anand together got a profit of Rs. 9,600 and&lt;br /&gt; they distributed between themselves in the ratio of 5 : 7.&lt;br /&gt; What is the share of Animesh?&lt;br /&gt; (a) Rs. 4,000&lt;br /&gt; (b) Rs. 5,600&lt;br /&gt; (c) Rs. 4,800&lt;br /&gt; (d) Rs. 5,200&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  Rs. 4,000&lt;br /&gt;  &lt;br /&gt;41. A man bought some fruits at the rate of 16 for Rs. 24&lt;br /&gt; and sold them at the rate of 8 for Rs. 18.  What is the&lt;br /&gt; profit per cent?&lt;br /&gt; (a) 50%&lt;br /&gt; (b) 60%&lt;br /&gt; (c) 40%&lt;br /&gt; (d) 25%&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  50%&lt;br /&gt;  &lt;br /&gt;42. A cow is tethered in the middle of a field with a 14&lt;br /&gt; feet long rope.  If the cow grazes 100 sq feet per day&lt;br /&gt; approximately.  What time will be taken by the cow to graze&lt;br /&gt; the grazeable area of the field?&lt;br /&gt; (a) 2 days&lt;br /&gt; (b) 18 days&lt;br /&gt; (c) 24 days&lt;br /&gt; (d) 6 days&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  6 days&lt;br /&gt;  &lt;br /&gt;43. 7/8  of 3/7 of a number is equal to 25% of 45% of&lt;br /&gt; another number.  What is the ratio of the first and the&lt;br /&gt; second numbers respectively?&lt;br /&gt; (a) 3 : 7&lt;br /&gt; (b) 9: 10&lt;br /&gt; (c) 3 : 10&lt;br /&gt; (d) 3 : 2&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  3 : 10&lt;br /&gt;  &lt;br /&gt;44. Mr. Rahul spends 30% of his monthly salary on domestic&lt;br /&gt; expenses.  He spends respectively 20% and 10% of the&lt;br /&gt; remaining salary on education of children and conveyance.&lt;br /&gt; Of the remaining amounts now he spends respectively 20% and&lt;br /&gt; 30% on entertainment and maintenance of house.  He saves Rs.&lt;br /&gt; 5512.50.   what is the monthly salary of Mr. Rahul?&lt;br /&gt; (a) Rs. 22,500&lt;br /&gt; (b) Rs. 20,000&lt;br /&gt; (c) Rs. 25,000&lt;br /&gt; (d) Rs. 24,500&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  Rs. 22,500&lt;br /&gt;  &lt;br /&gt;45. The ratio of the present ages of Suman and Renu is 5 : 7&lt;br /&gt; respectively.  Four years hence the ratio will become 3 : 4&lt;br /&gt; respectively.   What is the present age of Renu in years?&lt;br /&gt; (a) 28&lt;br /&gt; (b) 24&lt;br /&gt; (c) 20&lt;br /&gt; (d) 21&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  28&lt;br /&gt;  &lt;br /&gt;46. If instead of multiplying a number by 7 the number was&lt;br /&gt; divided by 7.  What should be the percentage error?&lt;br /&gt; (a) 100%&lt;br /&gt; (b) 96.8%&lt;br /&gt; (c) 92.70%&lt;br /&gt; (d) 97.9%&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  97.9%&lt;br /&gt;  &lt;br /&gt;47. A car covers a certain distance taking 7 hours in&lt;br /&gt; forward journey.  During the return journey, speed was&lt;br /&gt; increased by 12 kmph and it takes 5 hours.  What is total&lt;br /&gt; distance covered?&lt;br /&gt; (a) 210 km&lt;br /&gt; (b) 70 km&lt;br /&gt; (c) 440 km&lt;br /&gt; (d) 220 km&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  210 km&lt;br /&gt;  &lt;br /&gt;48. The LCM of two numbers is 2079 and their HCF is 27.   If&lt;br /&gt; one of the numbers is 189, find the other number.&lt;br /&gt; (a) 248&lt;br /&gt; (b) 128&lt;br /&gt; (c) 297&lt;br /&gt; (d) 336&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  297&lt;br /&gt;  &lt;br /&gt;49. The average between a two digit number and the number&lt;br /&gt; obtained by interchanging the digits is 9.  What is the&lt;br /&gt; difference between the two digits of the number?&lt;br /&gt; (a) 8&lt;br /&gt; (b) 2&lt;br /&gt; (c) 5&lt;br /&gt; (d) Cannot be determined&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  Cannot be determined&lt;br /&gt;  &lt;br /&gt;50. A circle and a rectangle have the same perimeter.  The&lt;br /&gt; sides of the rectangle are 18 cm and 26 cm.  What will be&lt;br /&gt; the area of the circle?&lt;br /&gt; (a) 88 cm2&lt;br /&gt; (b) 1250 cm2&lt;br /&gt; (c) 154 cm2&lt;br /&gt; (d) 128 cm2&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( e )  None of these&lt;br /&gt;  &lt;br /&gt;51. The difference between a number and its three-fifth is&lt;br /&gt; 50.  What is the number?&lt;br /&gt; (a) 75&lt;br /&gt; (b) 100&lt;br /&gt; (c) 125&lt;br /&gt; (d) 80&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  125&lt;br /&gt;  &lt;br /&gt;52. Some persons decide to raise Rs. 3 lakhs by equal&lt;br /&gt; contribution from each of them.  If they contributed Rs. 50&lt;br /&gt; extra each, the contribution increased to Rs. 3.25 lakhs.&lt;br /&gt; How many persons were there ?&lt;br /&gt; (a) 400&lt;br /&gt; (b) 500&lt;br /&gt; (c) 600&lt;br /&gt; (d) 700&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  500&lt;br /&gt;  &lt;br /&gt;53. A sample of milk contains 5% water.  What quantity of&lt;br /&gt; pure milk should be added to 10 litres of milk to reduce the&lt;br /&gt; water content to 2%?&lt;br /&gt; (a) 5 litres&lt;br /&gt; (b) 7 litres&lt;br /&gt; (c) 15 litres&lt;br /&gt; (d) 12 litres&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  15 litres&lt;br /&gt;  &lt;br /&gt;54. The difference between the compound interest and the&lt;br /&gt; simple interest on a certain sum of money at 5% per annum&lt;br /&gt; for 2 years is Rs. 1.50.   Find the sum.&lt;br /&gt; (a) Rs. 800&lt;br /&gt; (b) Rs. 1200&lt;br /&gt; (c) Rs. 400&lt;br /&gt; (d) Rs. 600&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  Rs. 600&lt;br /&gt;  &lt;br /&gt;55. A, B and C contract a work for Rs. 550.  Together A and&lt;br /&gt; B are supposed to do 7/11th of the work.  How much does C get?&lt;br /&gt; (a) Rs. 270&lt;br /&gt; (b) Rs. 200&lt;br /&gt; (c) Rs. 310&lt;br /&gt; (d) Rs. 175&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  Rs. 200&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 56?60) : Study the following information&lt;br /&gt;carefully and answer the questions given below:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;There is a five storey building including the ground floor&lt;br /&gt;and each floor has only one flat.  All these flats have been&lt;br /&gt;occupied by the five Bank Probationary Officers.  Each&lt;br /&gt;officer owns a different car.  The cars are :  Indica, Ikon,&lt;br /&gt;Indigo, Elentra and Santro.  The five officers?A, B, X, Y&lt;br /&gt;and Z ? are employed in the different banks, viz., State&lt;br /&gt;Bank of India (SBI), Punjab National Bank (PNB), UCO Bank,&lt;br /&gt;ICICI Bank and HDFC Bank but not necessarily in the same&lt;br /&gt;order.  Mr. X works in HDFC Bank and lives on the ground&lt;br /&gt;floor.  The officer who lives on fourth (top) floor does not&lt;br /&gt;own Elentra or Santro.  Mr. B works in PNB and owns Elentra&lt;br /&gt;car.  The officer who works in UCO Bank and lives on second&lt;br /&gt;floor owns Indica car.  Mr. Y lives on third floor and owns&lt;br /&gt;Indigo.  Mr. Z works in ICICI Bank and Mr. Y works in State&lt;br /&gt;Bank of India.&lt;br /&gt;&lt;br /&gt;56. Who among the following does own Santro car ?&lt;br /&gt; (a) A&lt;br /&gt; (b) B&lt;br /&gt; (c) X&lt;br /&gt; (d) Cannot be determined&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  X&lt;br /&gt;  &lt;br /&gt;57. Who lives on the second floor ?&lt;br /&gt; (a) X&lt;br /&gt; (b) Y&lt;br /&gt; (c) Z&lt;br /&gt; (d) A&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  A&lt;br /&gt;  &lt;br /&gt;58. On which floor does B live ?&lt;br /&gt; (a) First&lt;br /&gt; (b) Second&lt;br /&gt; (c) Fourth&lt;br /&gt; (d) Cannot be determined&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  First&lt;br /&gt;  &lt;br /&gt;59. Who among the following owns Indica car ?&lt;br /&gt; (a) X&lt;br /&gt; (b) A&lt;br /&gt; (c) Y&lt;br /&gt; (d) B&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  A&lt;br /&gt;  &lt;br /&gt;60. Which of the following combinations of the officer and&lt;br /&gt; car is correct ?&lt;br /&gt; (a) Mr. X  : Elentra&lt;br /&gt; (b) Mr. Y : Ikon&lt;br /&gt; (c) Mr. A : Santro&lt;br /&gt; (d) Mr. Z : Ikon&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  Mr. Z : Ikon&lt;br /&gt;  &lt;br /&gt;61. For which of the following values of x the inequality x&lt;br /&gt; (x + 3) &lt;&gt; 2,  x &lt; -5  (b) -3 &lt;&gt; 5&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  -3 &lt; x &lt; 0&lt;br /&gt;  &lt;br /&gt;62. There is a leak in the bottom of a cistern.  When the&lt;br /&gt; cistern is thoroughly repaired, it would be filled in 3 ½&lt;br /&gt; hours.  It now takes half an hour longer.  If the cistern is&lt;br /&gt; full, how long will the leak take to empty the cistern?&lt;br /&gt; (a) 24 hours&lt;br /&gt; (b) 28 hours&lt;br /&gt; (c) 21 hours&lt;br /&gt; (d) 27 hours&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  24 hours&lt;br /&gt;  &lt;br /&gt;63. If the diagonals of a rhombus are 8 cm and 10 cm&lt;br /&gt; respectively what will be the area of the rhombus?&lt;br /&gt; (a) 35 sq cm&lt;br /&gt; (b) 40 sq cm&lt;br /&gt; (c) 30 sq cm&lt;br /&gt; (d) 20 sq cm&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  40 sq cm&lt;br /&gt;  &lt;br /&gt;64. Some toys were distributed equally among 18 children in&lt;br /&gt; such a way that the number of toys each child gets is equal&lt;br /&gt; to the total number of children and after distribution 6&lt;br /&gt; toys are left out.  What was the total number of toys?&lt;br /&gt; (a) 324&lt;br /&gt; (b) 330&lt;br /&gt; (c) 336&lt;br /&gt; (d) 320&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  330&lt;br /&gt;  &lt;br /&gt;65. A shopkeeper allows 10% discount on the price of an&lt;br /&gt; article and sells it for Rs. 7,600.  What is the market&lt;br /&gt; price of the article ?&lt;br /&gt; (a) Rs. 8,250&lt;br /&gt; (b) Rs. 8,500&lt;br /&gt; (c) Rs. 8,540&lt;br /&gt; (d) Rs. 8,415&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( e )  None of these&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 66?70) : Below in each question five words&lt;br /&gt;are given.  Which of them will come in the middle place if&lt;br /&gt;all of them are arranged alphabetically?  Serial number of&lt;br /&gt;that word is the answer.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;66. (a) Encounter&lt;br /&gt; (b) Enormous&lt;br /&gt; (c) Engineer&lt;br /&gt; (d) Enlarge&lt;br /&gt; (e) Encroach&lt;br /&gt; Ans: ( c )  Engineer&lt;br /&gt;  &lt;br /&gt;67. (a) Network&lt;br /&gt; (b) Nepotism&lt;br /&gt; (c) Neutral&lt;br /&gt; (d) Neighbour&lt;br /&gt; (e) Nervous&lt;br /&gt; Ans: ( e )  Nervous&lt;br /&gt; &lt;br /&gt;68. (a) Granular&lt;br /&gt; (b) Gratuity&lt;br /&gt; (c) Gravitate&lt;br /&gt; (d) Greatness&lt;br /&gt; (e) Grateful&lt;br /&gt; Ans: ( b )  Gratuity&lt;br /&gt; &lt;br /&gt;69. (a) Residential&lt;br /&gt; (b) Reputation&lt;br /&gt; (c) Resistant&lt;br /&gt; (d) Residence&lt;br /&gt; (e) Reschedule&lt;br /&gt; Ans: ( d )  Residence&lt;br /&gt;  &lt;br /&gt;70. (a) Bracelet&lt;br /&gt; (b) Boutique&lt;br /&gt; (c) Bourgeois&lt;br /&gt; (d) Brackish&lt;br /&gt; (e) Bramble&lt;br /&gt; Ans: ( a )  Bracelet&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 71?75) :The number group in each question&lt;br /&gt;is to be codified in the following codes :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Number 3 8 7 0 1 9 6 4 2 5&lt;br /&gt;Codes N L D M H B V R G P&lt;br /&gt;.&lt;br /&gt;You have to find out which of the answers (A), (B), (C) and&lt;br /&gt;(D) has the correct coded form of the given number group.&lt;br /&gt;If none of the coded form is correct, mark (E) as the answer.&lt;br /&gt;&lt;br /&gt;71. 6182734&lt;br /&gt; (a) HBGPLDM&lt;br /&gt; (b) VBLGRNH&lt;br /&gt; (c) VHLGDNR&lt;br /&gt; (d) BHNDGHR&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  VHLGDNR&lt;br /&gt;  &lt;br /&gt;72. 349805&lt;br /&gt; (a) NRBLMP&lt;br /&gt; (b) BRNLPM&lt;br /&gt; (c) LRDGMP&lt;br /&gt; (d) PMLHBR&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  NRBLMP&lt;br /&gt;  &lt;br /&gt;73. 57920642&lt;br /&gt; (a) DPBGMVRH&lt;br /&gt; (b) PDBRLNGH&lt;br /&gt; (c) MVRGHLDP&lt;br /&gt; (d) PDBGMVRG&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( d )  PDBGMVRG&lt;br /&gt;  &lt;br /&gt;74. 7561024&lt;br /&gt; (a) DPVGMRH&lt;br /&gt; (b) DPVHMGR&lt;br /&gt; (c) HMRLDVP&lt;br /&gt; (d) VHDPGRL&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( b )  DPVHMGR&lt;br /&gt;  &lt;br /&gt;75. 48236017&lt;br /&gt; (a) RLGDLMHV&lt;br /&gt; (b) BNDPGMRH&lt;br /&gt; (c) VHMGDMRL&lt;br /&gt; (d) HNPGBMHV&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( e )  None of these&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 76?80) : The news item given in each&lt;br /&gt;question below is to be classified into one of the following&lt;br /&gt;five areas. &lt;/span&gt;&lt;br /&gt;(a) Political and Social,  (b) sports and Culture,   (c)&lt;br /&gt;Science and Health&lt;br /&gt;(d)  Economics and Commerce,  and  (e)  Miscellaneous&lt;br /&gt;&lt;br /&gt;76. International Film Festival of India was organized in&lt;br /&gt; Chennai recently.&lt;br /&gt; Ans: ( b )  sports and Culture&lt;br /&gt;  &lt;br /&gt;77. India will host 2010 Commonwealth Games&lt;br /&gt; Ans: ( b )  sports and Culture&lt;br /&gt;  &lt;br /&gt;78. Sustained efforts are needed to secure the release of&lt;br /&gt; hotages.&lt;br /&gt; Ans: ( e )  Miscellaneous&lt;br /&gt;  &lt;br /&gt;79. India and Japan are considering to have dialogue on&lt;br /&gt; defence issue.&lt;br /&gt; Ans: ( a )  Political and Social&lt;br /&gt;  &lt;br /&gt;80. New vaccine MMR has been developed for children.&lt;br /&gt; Ans: ( c )  Science and Health&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;TEST ?III :: ENGLISH LANGUAGE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 81?90) :In the following passage there are&lt;br /&gt;blanks, each of which has been numbered.  These numbers are&lt;br /&gt;printed below the passage and against each, five words are&lt;br /&gt;suggested, one of which fills the blank appropriately.  Find&lt;br /&gt;out the appropriate word in each case.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Fourteen centuries ago when the world was much younger,&lt;br /&gt;the ruler of all India, Rajah Balhait, was ??..(151) about&lt;br /&gt;his people.  A new game of dice, called hard, had  ???(152)&lt;br /&gt;the imagination of his subjects, teaching them that chance&lt;br /&gt;alone-a-roll of the dice guided the  ???(153) of men.  All&lt;br /&gt;who played this game of fortune lost their ???(155) in the&lt;br /&gt;virtues of courage, prudence, wisdom and hope.  It bred a&lt;br /&gt;fatalism that was  ???(155) the spirit of the kingdom.&lt;br /&gt;Raja Balhait commissioned Sissa, an intelligent courter at&lt;br /&gt;his court to find an answer to this  ???(156)   After much&lt;br /&gt;???(157) the clever Sissa invented another game.&lt;br /&gt;Chaturanga, the exact  ???(158) of hard, in which the four&lt;br /&gt;elements of the Indian army were the key pleces.  In the&lt;br /&gt;game these pieces-chariots, horses, elephants and foot&lt;br /&gt;soldiers-joined with a royal counselor to defend their king&lt;br /&gt;and defeat the enemy.  Forceful ???(159) was demanded of the&lt;br /&gt;players?not luck.  Chaturanga soon became more popular than&lt;br /&gt;hard, and the  ???(160) to the Kingdom was over.&lt;br /&gt; &lt;br /&gt;81. (a) concerned&lt;br /&gt; (b) confident&lt;br /&gt; (c) ignorant&lt;br /&gt; (d) indifferent&lt;br /&gt; (e) partisan&lt;br /&gt; Ans: ( a )  concerned&lt;br /&gt;  &lt;br /&gt;82. (a) propelled&lt;br /&gt; (b) enshrined&lt;br /&gt; (c) captured&lt;br /&gt; (d) activated&lt;br /&gt; (e) enhanced&lt;br /&gt; Ans: ( c )  captured&lt;br /&gt;  &lt;br /&gt;83. (a) communities&lt;br /&gt; (b) ways&lt;br /&gt; (c) abnormalities&lt;br /&gt; (d) destiny&lt;br /&gt; (e) groups&lt;br /&gt; Ans: ( d )  destiny&lt;br /&gt;  &lt;br /&gt;84. (a) bravado&lt;br /&gt; (b) interest&lt;br /&gt; (c) peace&lt;br /&gt; (d) wealth&lt;br /&gt; (e) faith&lt;br /&gt; Ans: ( b )  interest&lt;br /&gt;  &lt;br /&gt;85. (a) appalling&lt;br /&gt; (b) crushing&lt;br /&gt; (c) moistening&lt;br /&gt; (d) promoting&lt;br /&gt; (e) overwhelming&lt;br /&gt; Ans: ( e )  overwhelming&lt;br /&gt;  &lt;br /&gt;86. (a) apprehension&lt;br /&gt; (b) risk&lt;br /&gt; (c) problem&lt;br /&gt; (d) game&lt;br /&gt; (e) destiny&lt;br /&gt; Ans: ( e )  destiny&lt;br /&gt;  &lt;br /&gt;87. (a) deliberation&lt;br /&gt; (b) absorption&lt;br /&gt; (c) insight&lt;br /&gt; (d) hesitation&lt;br /&gt; (e) reluctance&lt;br /&gt; Ans: ( a )  deliberation&lt;br /&gt;  &lt;br /&gt;88. (a) nature&lt;br /&gt; (b) equivalent&lt;br /&gt; (c) picture&lt;br /&gt; (d) opposite&lt;br /&gt; (e) replica&lt;br /&gt; Ans: ( d )  opposite&lt;br /&gt;  &lt;br /&gt;89. (a) prediction&lt;br /&gt; (b) concentration&lt;br /&gt; (c) manipulation&lt;br /&gt; (d) attack&lt;br /&gt; (e) fortune&lt;br /&gt; Ans: ( b )  concentration&lt;br /&gt; &lt;br /&gt;90. (a) devastation&lt;br /&gt; (b) anxiety&lt;br /&gt; (c) impeachment&lt;br /&gt; (d) nuisance&lt;br /&gt; (e) threat&lt;br /&gt; Ans: ( e )  threat&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 91?95) : Read each sentence to find out&lt;br /&gt;whether there is any grammatical error in it.  The error, if&lt;br /&gt;any, will be in one part of the sentence.  The number of&lt;br /&gt;that part is the answer.  If there is not error, the answer&lt;br /&gt;is ?E?.  (Ignore errors of punctuation, if any)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;91. If your don?t (a) / understand any of these words (b) /&lt;br /&gt; you could (c) / always refer a dictionary. (d) / No error (e)&lt;br /&gt; Ans: ( e )  &lt;br /&gt;  &lt;br /&gt;92. Tea is so hot (a) / that she (b) / can (c) / take it.&lt;br /&gt; (d) / No error (e)&lt;br /&gt; Ans: ( a )  &lt;br /&gt;  &lt;br /&gt;93. The teacher said (a) / that the earth (b) / moves round&lt;br /&gt; (c) / the sun. (d) / No error (e)&lt;br /&gt; Ans: ( e )  &lt;br /&gt;  &lt;br /&gt;94. He told to me (a) / that he (b) / was going away (c) /&lt;br /&gt; the next day. (d) / No error (e)&lt;br /&gt; Ans: ( b )  &lt;br /&gt;  &lt;br /&gt;95. The lecturer says (a) / that Solomon won the respect (b)&lt;br /&gt; / of all races and (c) / classes by his justice. (d) / No&lt;br /&gt; error (e)&lt;br /&gt; Ans: ( e )  &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 96?100) : In each of the following&lt;br /&gt;questions, select the most appropriate word from among the&lt;br /&gt;five words given below the sentence to fill in the blanks in&lt;br /&gt;the sentence so as to complete it meaningfully.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;96. Sunil was ???asleep and could not be easily awakened.&lt;br /&gt; (a) high&lt;br /&gt; (b) fast&lt;br /&gt; (c) severe&lt;br /&gt; (d) total&lt;br /&gt; (e) has&lt;br /&gt; Ans: ( b )  fast&lt;br /&gt;  &lt;br /&gt;97. The vehicle did not come to a sudden halt since he&lt;br /&gt; braked  ???&lt;br /&gt; (a) immediately&lt;br /&gt; (b) silently&lt;br /&gt; (c) gently&lt;br /&gt; (d) completely&lt;br /&gt; (e) detected&lt;br /&gt; Ans: ( c )  gently&lt;br /&gt;  &lt;br /&gt;98. I saw him going escorted ??? two policemen.&lt;br /&gt; (a) with&lt;br /&gt; (b) against&lt;br /&gt; (c) by&lt;br /&gt; (d) on&lt;br /&gt; (e) for&lt;br /&gt; Ans: ( c )  by&lt;br /&gt;  &lt;br /&gt;99. Madhav is a sick man and has to be taken to the doctor ???&lt;br /&gt; (a) usually&lt;br /&gt; (b) timely&lt;br /&gt; (c) seldom&lt;br /&gt; (d) frequently&lt;br /&gt; (e) avoided&lt;br /&gt; Ans: ( d )  frequently&lt;br /&gt;  &lt;br /&gt;100. The child was left in the servants ???&lt;br /&gt; (a) care&lt;br /&gt; (b) duty&lt;br /&gt; (c) work&lt;br /&gt; (d) help&lt;br /&gt; (e) innocence&lt;br /&gt; Ans: ( a )  care&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 101?105) :Rearrange the following six&lt;br /&gt;sentences I, II, III, IV, V and VI in proper sequence so as&lt;br /&gt;to form a meaningful paragraph.  Then answer the questions&lt;br /&gt;given below them.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I. We were interested by contrast in understanding what&lt;br /&gt;  lessons actual teams and non-teams had for others to choose&lt;br /&gt;  to struggle with change and performance.&lt;br /&gt;II. Still, we suspected that most of these focused on&lt;br /&gt;   persuading readers that ?terms are important?.&lt;br /&gt;III. After all we thought teams are a well-known subject and&lt;br /&gt;    there must be a thousand books on the subject already.&lt;br /&gt;IV. By going down this path we hope to discover something to&lt;br /&gt;   say that was different from most books on the subject.&lt;br /&gt;V. We approached the idea of a book on teams cautiously.&lt;br /&gt;VI. Alternatively they focused on providing you to advise on&lt;br /&gt;   building teams as an objective in it self.&lt;br /&gt;&lt;br /&gt;101. Which of the following will be the SECOND sentence?&lt;br /&gt; (a) I&lt;br /&gt; (b) II&lt;br /&gt; (c) VI&lt;br /&gt; (d) III&lt;br /&gt; (e) IV&lt;br /&gt; Ans: ( d )  III&lt;br /&gt;  &lt;br /&gt;102. Which of the following will be the FIRST sentence ?&lt;br /&gt; (a) V&lt;br /&gt; (b) I&lt;br /&gt; (c) II&lt;br /&gt; (d) III&lt;br /&gt; (e) IV&lt;br /&gt; Ans: ( a )  V&lt;br /&gt;  &lt;br /&gt;103. Which of the following will be the THIRD sentence ?&lt;br /&gt; (a) V&lt;br /&gt; (b) III&lt;br /&gt; (c) II&lt;br /&gt; (d) VI&lt;br /&gt; (e) IV&lt;br /&gt; Ans: ( c )  II&lt;br /&gt;  &lt;br /&gt;104. Which of the following will be the FIFTH sentence ?&lt;br /&gt; (a) III&lt;br /&gt; (b) IV&lt;br /&gt; (c) II&lt;br /&gt; (d) VI&lt;br /&gt; (e) I&lt;br /&gt; Ans: ( e )  I&lt;br /&gt;  &lt;br /&gt;105. Which of the following will be the LAST sentence ?&lt;br /&gt; (a) III&lt;br /&gt; (b) IV&lt;br /&gt; (c) V&lt;br /&gt; (d) VI&lt;br /&gt; (e) II&lt;br /&gt; Ans: ( b )  IV&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 106?110) : In each sentence below four&lt;br /&gt;words have been printed in bold type, which are numbered&lt;br /&gt;(A), (B), (C), (D).  One of these words may be either&lt;br /&gt;wrongly spelt or inappropriate in the context of the&lt;br /&gt;sentence.  The number of that word is the answer.  If all&lt;br /&gt;the four words are spelt correctly, the answer is (E), i.e.,&lt;br /&gt;all correct.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;106. He had experienced (a) / a purposefully (b) /&lt;br /&gt; discussion (c) / on topics of our interest. (d) / All&lt;br /&gt; correct (e)&lt;br /&gt; Ans: ( b )  &lt;br /&gt;  &lt;br /&gt;107. To solve a (a) / problem, one needs to have (b) /&lt;br /&gt; intelligent and firm (c) / determination. (d) / All correct (e)&lt;br /&gt; Ans: ( c )  &lt;br /&gt;  &lt;br /&gt;108. Many legends (a) / superstions endow the moon with (b)&lt;br /&gt; / a beauty and mistery which will (c) / linger for countless&lt;br /&gt; years. (d) / All correct (e)&lt;br /&gt; Ans: ( c )  &lt;br /&gt;  &lt;br /&gt;109. People in our country are distressed (a) / by the spate&lt;br /&gt; of strikes, an almost (b) / perpetual go-slow and (c) /&lt;br /&gt; increadibly low productivity. (d) / All correct (e)&lt;br /&gt; Ans: ( d )  &lt;br /&gt;  &lt;br /&gt;110. The faces of the (a) / twins were so (b) / identical&lt;br /&gt; that we could not (c) / differentiate between them. (d) /&lt;br /&gt; All correct (e)&lt;br /&gt; Ans: ( c )  &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 111?115) : In each of the following&lt;br /&gt;questions five words are given, which are numbered I, II,&lt;br /&gt;III, IV and V.  By using all the five words, each only once,&lt;br /&gt;you have to frame a meaningful and grammatically correct&lt;br /&gt;sentence.  The correct order of the words is the answer.&lt;br /&gt;Choose from the five alternatives the one having the correct&lt;br /&gt;order of words and mark it as your answer on the answer sheet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;111. I.  interested  II.  in   III.  children&lt;br /&gt; IV. are  V.  games&lt;br /&gt; (a) III,  IV,  I,  II,  V&lt;br /&gt; (b) V,  IV,  I,  II,  III&lt;br /&gt; (c) III,  IV,  V, I,  II&lt;br /&gt; (d) III,  V,  IV,  I,  II&lt;br /&gt; (e) III,  IV,  II, V, I&lt;br /&gt; Ans: ( a )  III,  IV,  I,  II,  V&lt;br /&gt;  &lt;br /&gt;112. I.  was  II.   to  III.   he&lt;br /&gt; VI.  go  V.   ready&lt;br /&gt; (a) III,  I,  II,  IV,  V&lt;br /&gt; (b) I,  III,  IV,  II,  V&lt;br /&gt; (c) III,  IV,  II,  V,  I&lt;br /&gt; (d) I,  II,  IV,  III,  V&lt;br /&gt; (e) III,  I,  V,  II,  IV&lt;br /&gt; Ans: ( e )  III,  I,  V,  II,  IV&lt;br /&gt;  &lt;br /&gt;113. I. found II. lost III. his&lt;br /&gt; IV. book V. we&lt;br /&gt; (a) V,  II,  III,  I,  IV&lt;br /&gt; (b) III,  IV,  II,  V,  I&lt;br /&gt; (c) V,  I,  III,  II,  IV&lt;br /&gt; (d) V,  II,  III,  IV,  I&lt;br /&gt; (e) III,  IV,  V,  II,  I&lt;br /&gt; Ans: ( c )  V,  I,  III,  II,  IV&lt;br /&gt;  &lt;br /&gt;114. I. of II. he III. proud&lt;br /&gt; IV. me V. was&lt;br /&gt; (a) V,  II,  IV,  I,  III&lt;br /&gt; (b) II,  V,  IV,  I,  III&lt;br /&gt; (c) IV,  V,  III,  I,  II&lt;br /&gt; (d) II,  V,  III,  I,  IV&lt;br /&gt; (e) II,  III,  V,  I,  IV&lt;br /&gt; Ans: ( d )  II,  III,  V,  I,  IV&lt;br /&gt;  &lt;br /&gt;115. I. decision II. happy III. made&lt;br /&gt; IV. your V. me&lt;br /&gt; (a) IV,  III,  V,  II,  I&lt;br /&gt; (b) IV,  I,  III,  V,  II&lt;br /&gt; (c) II,  I,  III,  V,  IV&lt;br /&gt; (d) IV,  I,  V,  III,  II&lt;br /&gt; (e) II,  III,  V,  IV,  I&lt;br /&gt; Ans: ( b )  IV,  I,  III,  V,  II&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 116?120) : In the following questions, five&lt;br /&gt;words are given out of which only one is mis-spelt.  Find&lt;br /&gt;that mis-spelt word and indicate it in the Answer Sheet.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;116. (a) combination&lt;br /&gt; (b) exageration&lt;br /&gt; (c) hallucination&lt;br /&gt; (d) admonition&lt;br /&gt; (e) clinical&lt;br /&gt; Ans: ( b )  exageration&lt;br /&gt; &lt;br /&gt;117. (a) sacrosanct&lt;br /&gt; (b) sacrelege&lt;br /&gt; (c) sacred&lt;br /&gt; (d) sacrament&lt;br /&gt; (e) segment&lt;br /&gt; Ans: ( b )  sacrelege&lt;br /&gt; &lt;br /&gt;118. (a) allitration&lt;br /&gt; (b) allowance&lt;br /&gt; (c) almighty&lt;br /&gt; (d) almanac&lt;br /&gt; (e) illicit&lt;br /&gt; Ans: ( a )  allitration&lt;br /&gt;  &lt;br /&gt;119. (a) idiosyncrasy&lt;br /&gt; (b) idealise&lt;br /&gt; (c) idiosy&lt;br /&gt; (d) ideology&lt;br /&gt; (e) ieonoclass&lt;br /&gt; Ans: ( c )  idiosy&lt;br /&gt;  &lt;br /&gt;120. (a) jaundise&lt;br /&gt; (b) jasmine&lt;br /&gt; (c) jevelin&lt;br /&gt; (d) jarving&lt;br /&gt; (e) judgement&lt;br /&gt; Ans: ( a )  jaundise&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Directions (Qs. 121?130) : Read the following passage&lt;br /&gt;carefully and answer the questions given below it.  Certain&lt;br /&gt;words/phrases in the passage are printed in bold to help you&lt;br /&gt;locate them while answering some of the questions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Nature is an infinite source of beauty.  Sunrise and&lt;br /&gt;sunset, mountains and rivers, lakes and glaciers, forests&lt;br /&gt;and fields provide joy and bliss to the human mind and heart&lt;br /&gt;for hours together.  Everything in nature is splendid and&lt;br /&gt;divine.  Everyday and every season of the year has a&lt;br /&gt;peculiar beauty to unfold.   Only one should have eyes to&lt;br /&gt;behold it and a heart to feel it like the English poet&lt;br /&gt;William Wordsworth who after seeing daffodils said: ?And&lt;br /&gt;then my heart with pleasure fills and dances with the&lt;br /&gt;daffodils?.&lt;br /&gt;Nature is a great teacher.  The early man was thrilled with&lt;br /&gt;beauty and wonders of nature.  The Aryans worshipped nature.&lt;br /&gt;One can learn the lessons in the vast school of nature. &lt;br /&gt;Unfortunately the strife, the stress and the tension of&lt;br /&gt;modern life have made people immune to beauties of nature.&lt;br /&gt;Their life is so full of care that they have no time to&lt;br /&gt;stand and stare.  They cannot enjoy the beauty of lowing&lt;br /&gt;rivers, swinging trees, flying birds and majestic mountains&lt;br /&gt;and hills.   There is however, a cry to go back to village&lt;br /&gt;from the concrete and artificial jungle of cities.    Hence&lt;br /&gt;the town planners of today pay special attention to provide&lt;br /&gt;enough number of natural scenic spots in town planning.  To&lt;br /&gt;develop a balanced personality, one needs to have a healthy&lt;br /&gt;attitude which can make us appreciate and enjoy the beauty&lt;br /&gt;of nature.&lt;br /&gt;There is other balm to soothe our tired soul and listless&lt;br /&gt;mind than the infinite nature all around us.  We should&lt;br /&gt;enjoy it fully to lead a balanced and harmonious life, full&lt;br /&gt;of peace and tranquility.&lt;br /&gt;&lt;br /&gt;121. Which of the following words has the SAME meaning as&lt;br /&gt; the word care as used in the passage ?&lt;br /&gt; (a) grief&lt;br /&gt; (b) want&lt;br /&gt; (c) needs&lt;br /&gt; (d) pleasure&lt;br /&gt; (e) prejudices&lt;br /&gt; Ans: ( a )  grief&lt;br /&gt;  &lt;br /&gt;122. Choose the word which is most OPPOSITE in meaning of&lt;br /&gt; the word unfold as used in the passage.&lt;br /&gt; (a) declare&lt;br /&gt; (b) conceal&lt;br /&gt; (c) describe&lt;br /&gt; (d) perpetuate&lt;br /&gt; (e) evolve&lt;br /&gt; Ans: ( b )  conceal&lt;br /&gt;  &lt;br /&gt;123. Which of the following statements is not made in the&lt;br /&gt; passage about Nature?&lt;br /&gt; (a) Nature is an infinite source of beauty&lt;br /&gt; (b) Everything in nature is splendid and divine&lt;br /&gt; (c) Nature is a great teacher&lt;br /&gt; (d) The Aryans worshipped Nature&lt;br /&gt; (e) The early man was scared of Nature&lt;br /&gt; Ans: ( e )  The early man was scared of Nature&lt;br /&gt;  &lt;br /&gt;124. What is needed to develop balanced personality?&lt;br /&gt; (a) interpersonal skills&lt;br /&gt; (b) reading poetry&lt;br /&gt; (c) healthy attitude&lt;br /&gt; (d) going back to villages&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  healthy attitude&lt;br /&gt;  &lt;br /&gt;125. Why do people not enjoy the beauty of Nature ?&lt;br /&gt; (a) They are running after material pleasures&lt;br /&gt; (b) They do not consider nature as balm to soothe their&lt;br /&gt;  fired minds&lt;br /&gt; (c) Their life is full of worries and tensions&lt;br /&gt; (d) They are afraid of nature&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( c )  Their life is full of worries and tensions&lt;br /&gt;  &lt;br /&gt;126. What should we do to enjoy tranquil life ?&lt;br /&gt; (a) Get totally immersed in our daily routine&lt;br /&gt; (b) Believe that nature is infinite source of beauty&lt;br /&gt; (c) Lead a disciplined and dedicated life&lt;br /&gt; (d) Enjoy the nature around us&lt;br /&gt; (e) Form a habit of daily physical exercise&lt;br /&gt; Ans: ( d )  Enjoy the nature around us&lt;br /&gt;  &lt;br /&gt;127. What are the town planners doing today?&lt;br /&gt; (a) Providing facilities for enjoying nature&lt;br /&gt; (b) Establishing balance between concrete and artificial&lt;br /&gt;  jungle of cities&lt;br /&gt; (c) Supporting the cry to go back to villages&lt;br /&gt; (d) Making efforts to inculcate healthy attitude among    people&lt;br /&gt; (e) None of these&lt;br /&gt; Ans: ( a )  Providing facilities for enjoying nature&lt;br /&gt;  &lt;br /&gt;128. Choose the word which is most OPPOSITE in meaning of&lt;br /&gt; the word listless as used in the passage&lt;br /&gt; (a) active&lt;br /&gt; (b) progressive&lt;br /&gt; (c) backward&lt;br /&gt; (d) hidden&lt;br /&gt; (e) impure&lt;br /&gt; Ans: ( a )  active&lt;br /&gt;  &lt;br /&gt;129. Choose the word which is most OPPOSITE in meaning of&lt;br /&gt; the word soothe as used in the passage ?&lt;br /&gt; (a) stabilize&lt;br /&gt; (b) excite&lt;br /&gt; (c) propagate&lt;br /&gt; (d) nature&lt;br /&gt; (e) strengthen&lt;br /&gt; Ans: ( b )  excite&lt;br /&gt;  &lt;br /&gt;130. According to the author of the passage, Nature&lt;br /&gt; (a) is the ultimate salvation of man&lt;br /&gt; (b) is the creator of this universe&lt;br /&gt; (c) brings uniformity in all seasons&lt;br /&gt; (d) maintains homeostasis in human beings&lt;br /&gt; (e) is abundantly glorious and divine&lt;br /&gt; Ans: ( e )  is abundantly glorious and divine&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4375417171549647388?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4375417171549647388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/06/bank-clerical-exams-model-test-papers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4375417171549647388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4375417171549647388'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/06/bank-clerical-exams-model-test-papers.html' title='Bank Clerical Exams Model Test Papers, 2004'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4259690329816042279</id><published>2009-05-23T20:40:00.000-07:00</published><updated>2009-05-23T20:44:22.729-07:00</updated><title type='text'>Make Money Online - Part Time Online Jobs</title><content type='html'>&lt;a href="http://www.rupeemail.in/rupeemail/invite.do?in=MzYwMTgyJSMlNHlGZVB6Ym9YOERXcE14ckJUT0p0TEVudg=="&gt;&lt;br /&gt;&lt;img src="http://www.rupeemail.in/rupeemail/pages/rupeemail/images/joinImage.gif" width="114" height="48" border="0"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Hi ,&lt;br /&gt;&lt;br /&gt;I have something interesting for you, RupeeMail!&lt;br /&gt;&lt;br /&gt;It’s really amazing! You get paid to open &amp; read the contents of RupeeMail. You receive promotional offers &amp; special discounts in RupeeMail.&lt;br /&gt;&lt;br /&gt;Interestingly RupeeMails will reach you based on the preference list you opted for.&lt;br /&gt;&lt;br /&gt;Create your RupeeMail Account &amp; refer your friends to earn launch referral bonus on every new registration.&lt;br /&gt;&lt;br /&gt;Try this... &lt;a href="http://www.rupeemail.in/rupeemail/invite.do?in=MzYwMTgyJSMlNHlGZVB6Ym9YOERXcE14ckJUT0p0TEVudg=="&gt;Join Now!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;RupeeMail, It pays&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.rupeemail.in/rupeemail/invite.do?in=MzYwMTgyJSMlNHlGZVB6Ym9YOERXcE14ckJUT0p0TEVudg=="&gt;&lt;br /&gt;&lt;img src="http://www.rupeemail.in/rupeemail/pages/rupeemail/images/joinImage.gif" width="114" height="48" border="0"&gt;&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4259690329816042279?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4259690329816042279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/05/make-money-online-part-time-online-jobs.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4259690329816042279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4259690329816042279'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/05/make-money-online-part-time-online-jobs.html' title='Make Money Online - Part Time Online Jobs'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-9055620641405427608</id><published>2009-04-27T03:21:00.000-07:00</published><updated>2009-04-27T03:25:55.848-07:00</updated><title type='text'>J2EE Interview Questions and Answers</title><content type='html'>What is    J2EE?&lt;br /&gt;&lt;br /&gt;J2EE is a Java 2 Enterprise Edition. J2EE is an environment for developing and deploying enterprise applications. J2EE specification is defined by Sun Microsystems Inc. The J2EE platform is lies of a set of services, application programming interfaces (APIs), and protocols, which provides the functionality necessary for developing multi-tiered, web-based applications. The J2EE platform is one of the richest platform for the development and deployment of enterprise applications.&lt;br /&gt;&lt;br /&gt;What do you understand by a J2EE module?&lt;br /&gt;&lt;br /&gt;A J2EE module is a software building block that consists of one or more than J2EE components of the same container type along with one deployment descriptor of that type. J2EE specification specifies four characters of modules:&lt;br /&gt;a) Web module &lt;br /&gt;b) EJB module&lt;br /&gt;c)  resource adapter&lt;br /&gt;d) application client and&lt;br /&gt;   &lt;br /&gt; Modules can also be assembled into J2EE applications. &lt;br /&gt;&lt;br /&gt;What is J2EE component?&lt;br /&gt;&lt;br /&gt;J2EE component is a collected functional software unit supported by a container and configurable at deployment time. The J2EE specification shows the following J2EE component part:&lt;br /&gt;&lt;br /&gt;    * Application clients and applets  that run on the client machine.&lt;br /&gt;       &lt;br /&gt;    * Java servlet and JavaServer Pages (JSP) technology  are Web components that run on the server machine.&lt;br /&gt;       &lt;br /&gt;    * Enterprise JavaBeans (EJB)  (enterprise beans) are business components that run on the server.&lt;br /&gt;&lt;br /&gt;          What is bean-managed transaction ?&lt;br /&gt;          Transaction whose boundaries are defined by an enterprise bean.&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;          What is binding (XML) ?&lt;br /&gt;          Generating the code needed to process a well-defined portion of XML data.&lt;br /&gt;                                    &lt;br /&gt;&lt;br /&gt;          What is binding (JSF) ?&lt;br /&gt;          Wiring UI components to back-end data sources such as backing bean properties.&lt;br /&gt;                                 &lt;br /&gt;&lt;br /&gt;          What is build file ?&lt;br /&gt;          The XML file that contains one or more asant targets.&lt;br /&gt;&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;          What is business logic ?&lt;br /&gt;          The code that implements the functionality of an application.&lt;br /&gt;&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;          What is business method ?&lt;br /&gt;          A method of an enterprise bean that implements the business logic or rules of an application.&lt;br /&gt;                                       &lt;br /&gt;&lt;br /&gt;          What is callback methods ?&lt;br /&gt;          Component methods called by the container to notify the component of important events in its life cycle.&lt;br /&gt;                                     &lt;br /&gt;&lt;br /&gt;          What is caller principal ?&lt;br /&gt;          It is principal that identifies the invoker of the enterprise bean method.&lt;br /&gt;&lt;br /&gt;           &lt;br /&gt;&lt;br /&gt;          What is caller ?&lt;br /&gt;          Same as caller principal.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What are the components of web module?&lt;br /&gt;&lt;br /&gt;There are the following modules:&lt;br /&gt;a) Java classes&lt;br /&gt;b) JSP files&lt;br /&gt;c) gif and html files and &lt;br /&gt;d) web component deployment descriptors&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Differentiate .ear,  .jar and .war files?&lt;br /&gt;&lt;br /&gt;These files are created for different uses .These files are only zipped file using java jar tool. Here is the description of these files:&lt;br /&gt;&lt;br /&gt;.ear files: The .ear file comprises the EJB modules of the application.&lt;br /&gt;.jar files:  are with the .jar extension. The .jar files comprises the libraries, resources and accessories files like property files.&lt;br /&gt;.war files: are with the .war extension. The war file comprises the web application that can be deployed on the any servlet/jsp container. The .war file contains jsp, html, JavaScript and other files for necessary for the development of web applications.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Differentiate between Session Bean and Entity Bean?&lt;br /&gt;&lt;br /&gt;Session Bean: Session is one of the EJB and it shows a single client inside the Application Server. Stateless session bean is easy to develop and its efficient. As compare to entity beans session beans needs few server resources.&lt;br /&gt;  &lt;br /&gt;Entity Bean: An entity bean represents persistent global data from the database. Entity beans data are stored into database.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Why J2EE is suitable for the development of distributed multi-tiered enterprise applications?&lt;br /&gt;&lt;br /&gt; J2EE application program allows the developers to design and implement the business logic into components according to business requirement. J2EE architecture allows the development of multi-tired applications and the developed applications can be installed on different machines depending on the tier in the multi-tiered J2EE environment . The J2EE application parts are:&lt;br /&gt;&lt;br /&gt;a) Web-tier components.&lt;br /&gt;b) Client-tier components .&lt;br /&gt;c) Business-tier components .&lt;br /&gt;d) Enterprise information system (EIS)-tier software.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;what is a container?&lt;br /&gt;&lt;br /&gt; containers are the interface between a component and the low-level platform specific functionality that supports the component.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What services provided by a container?&lt;br /&gt;&lt;br /&gt;The services provided by container are as follows:&lt;br /&gt;a) Transaction management for the bean&lt;br /&gt;b) Instance pooling for the bean &lt;br /&gt;c) Persistence&lt;br /&gt;d) Remote access&lt;br /&gt;e) Lifecycle management&lt;br /&gt;f) Database-connection pooling&lt;br /&gt;g) Security &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What are types of J2EE clients?&lt;br /&gt;&lt;br /&gt;a) Java-Web Start&lt;br /&gt;b) clients Applets&lt;br /&gt;c) Web applications&lt;br /&gt;d) Wireless clients&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What is Deployment Descriptor?&lt;br /&gt;&lt;br /&gt;A deployment descriptor is simply an XML(Extensible Markup Language) file with the extension of .xml.. Application servers reads the deployment descriptor to deploy the components contained in the deployment unit. As in: ejb-jar.xml file is used to describe the setting of the EJB.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What is JTA and JTS?&lt;br /&gt;&lt;br /&gt;JTA stands for Java Transaction API and JTS stands for Java Transaction Service. JTA provides a standard interface which allows the developers to demarcate transactions . JTA is a high level transaction interface used by the application code to control the transaction.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What is JAXP?&lt;br /&gt;&lt;br /&gt;The Java API for XML Processing (JAXP) enables applications to parse and transform XML documents independent of a particular XML processing implementation.&lt;br /&gt;&lt;br /&gt;What is J2EE Connector architecture?&lt;br /&gt;&lt;br /&gt;J2EE Connector Architecture (JCA) is a Java-based technology solution for connecting application servers and enterprise information systems (EIS) as part of enterprise application integration (EAI) solutions.&lt;br /&gt;&lt;br /&gt;differentiate between Java Bean and Enterprise Java Bean?&lt;br /&gt;&lt;br /&gt;Java Bean as is a plain java class with member variables and getter setter methods. Java Beans are defined under JavaBeans specification as Java-Based software component model. which lets in the features like introspection, customization,  events,  properties and  persistence. &lt;br /&gt;&lt;br /&gt; Differentiate JTS and JTA?&lt;br /&gt;&lt;br /&gt; JTS shows the implementation of a Java transaction manager. JTS specifies the implementation of a Transaction Manager which supports the Java Transaction API (JTA) 1.0.&lt;br /&gt;The JTA shows an architecture for building transactional application servers and defines a set of interfaces for various components of this architecture. The components are: the application, resource managers, and the application server.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Can Entity Beans have no create() methods?&lt;br /&gt;&lt;br /&gt; Entity Beans have no create() method, when entity bean is not used to store the data in the database. In this case entity bean is used to retrieve the data from database.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What are the call back methods in Session bean?&lt;br /&gt;&lt;br /&gt;Callback methods are called by the container to notify the important events to the beans in its life cycle.  The callback methods example are ejbCreate(), ejbPassivate(), and ejbActivate().&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What is bean managed transaction?&lt;br /&gt;&lt;br /&gt;In  the EJB transactions can be maintained by the container or developer can write own code to maintain the transaction. If a developer doesn’t want a Container to manage transactions, developer can write own code to maintain the database transaction.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What are transaction isolation levels in EJB?&lt;br /&gt;&lt;br /&gt;There are four levels :&lt;br /&gt;* Serializable&lt;br /&gt;* Committed Read&lt;br /&gt;* Repeatable Read&lt;br /&gt;* Uncommitted Read&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;What is "application client" ?&lt;br /&gt; Application clients have access to some J2EE platform APIs.&lt;br /&gt;                 &lt;br /&gt;&lt;br /&gt;What is "application client container" ?&lt;br /&gt;A container that supports application client components.&lt;br /&gt;                          &lt;br /&gt;&lt;br /&gt;What is "application client module" ?&lt;br /&gt;A software unit that have one or more classes and an application client deployment descriptor.&lt;br /&gt;                          &lt;br /&gt;&lt;br /&gt;What is "application component provider" ?&lt;br /&gt;A vendor that provides the Java classes that implement components' methods, JSP page definitions, and any required deployment descriptors.&lt;br /&gt;                      &lt;br /&gt;&lt;br /&gt;What are "application configuration resource file" ?&lt;br /&gt;An XML file used to configure resources for a Java Server Faces application.                                        &lt;br /&gt;&lt;br /&gt;What is "archiving" ?&lt;br /&gt;&lt;br /&gt;Process of saving the state of an object and restoring it.&lt;br /&gt;                     &lt;br /&gt;&lt;br /&gt;What is "asant" ?&lt;br /&gt;A Java-based build tool that can be extended using Java classes. The configuration files are XML-based, calling out a target tree where various tasks get executed.&lt;br /&gt;                                     &lt;br /&gt;&lt;br /&gt;What is "attribute"?&lt;br /&gt;A qualifier on an XML tag that provides additional information to the client .&lt;br /&gt;                          &lt;br /&gt;&lt;br /&gt;What is authentication ?&lt;br /&gt;Process that verifies the identity of a user, device, or other entity in a computer system.&lt;br /&gt;&lt;br /&gt;What is authorization ?&lt;br /&gt;The process by which access to a method or resource is determined.&lt;br /&gt;&lt;br /&gt;What is authorization constraint ?&lt;br /&gt;An  rule that determines who is permitted to access a Web resource collection.&lt;br /&gt;                          &lt;br /&gt;&lt;br /&gt;What is B2B ?&lt;br /&gt;B2B stands for Business-to-business process.&lt;br /&gt;                                 &lt;br /&gt;&lt;br /&gt;What is backing bean ?&lt;br /&gt;&lt;br /&gt; The backing bean defines properties for the components on the page and methods that perform processing for the component.&lt;br /&gt;                              &lt;br /&gt;&lt;br /&gt;What is basic authentication ?&lt;br /&gt;An authentication mechanism in which a Web server authenticates an entity via a user name and password obtained using the Web application's built-in authentication mechanism.&lt;br /&gt;                                   &lt;br /&gt;&lt;br /&gt;What is bean-managed persistence ?&lt;br /&gt;The mechanism whereby data transfer between an entity bean's variables and a resource manager is managed by the entity bean. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/interviewquestions/j2eeinterview.html"&gt;&lt;br /&gt;http://worldinfosoft.com/interviewquestions/j2eeinterview.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-9055620641405427608?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/9055620641405427608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/04/j2ee-interview-questions-and-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/9055620641405427608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/9055620641405427608'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/04/j2ee-interview-questions-and-answers.html' title='J2EE Interview Questions and Answers'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3424035316861582404</id><published>2009-04-27T03:16:00.000-07:00</published><updated>2009-04-27T03:18:03.653-07:00</updated><title type='text'>Swing Interview Questions and Answers</title><content type='html'>Define AWT?&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;AWT stands for Abstract Window Toolkit. AWT enables programmers to develop Java applications with GUI components, such as windows, and buttons.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Define JFC?&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;JFC stands for Java Foundation Classes. The Java Foundation Classes (JFC) are a set of Java class libraries created as part of Java 2 Platform, Standard  Edition (J2SE) to support building graphics user interface (GUI) and graphics functionality for client applications.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Differentiate between Swing and AWT?&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;AWT is heavy-weight components, but Swing is light-weight components.&lt;br /&gt;&lt;br /&gt;AWT is OS dependent because it uses native components, But Swing components are OS independent.&lt;br /&gt;&lt;br /&gt;We can change the look and feel in Swing which is not possible in AWT.&lt;br /&gt;&lt;br /&gt;Swing takes less memory compared to AWT.&lt;br /&gt;&lt;br /&gt;For drawing AWT uses screen rendering where Swing uses double buffering.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Define heavyweight components ?&lt;br /&gt;&lt;br /&gt;         &lt;br /&gt;&lt;br /&gt;A heavyweight component is that is associated with its own native screen resource.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Define lightweight component?&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;A lightweight component is  that who "borrows" the screen resource of an ancestor.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Define double buffering ?&lt;br /&gt;&lt;br /&gt;             &lt;br /&gt;&lt;br /&gt;Double buffering is the process of use of two buffers rather than one to temporarily hold data being moved to and from an I/O device.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/interviewquestions/swinginterview.html"&gt;Click Here to find more solution&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3424035316861582404?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3424035316861582404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/04/swing-interview-questions-and-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3424035316861582404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3424035316861582404'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/04/swing-interview-questions-and-answers.html' title='Swing Interview Questions and Answers'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-7335827368248334522</id><published>2009-04-27T03:09:00.000-07:00</published><updated>2009-04-27T03:15:24.133-07:00</updated><title type='text'>JDBC Interview Questions and Answers</title><content type='html'>How can you establish connection?&lt;br /&gt;To establish a connection you need to have the appropriate driver connect to the DBMS.&lt;br /&gt;The following line of code we use:&lt;br /&gt;&lt;br /&gt;String url = “jdbc:odbc:Fred”;&lt;br /&gt;Connection con = DriverManager.getConnection(url, “Fernanda”, “J8?);&lt;br /&gt;&lt;br /&gt;Define different types of Statements?&lt;br /&gt;There are three types of statements&lt;br /&gt;• Regular statement&lt;br /&gt;• prepared statement&lt;br /&gt;• callable statement&lt;br /&gt;&lt;br /&gt;What are the components of JDBC?&lt;br /&gt;The two major components of JDBC are Connection Pooling and Data Sources.&lt;br /&gt;&lt;br /&gt;Define metadata?&lt;br /&gt;Metadata is data about data.&lt;br /&gt;In JDBC, there are  two types&lt;br /&gt;1. Describing information about the Result set object. i&lt;br /&gt;2. describes about the database connection&lt;br /&gt;&lt;br /&gt;Differentiate between local and global transaction?&lt;br /&gt;A transaction is atomic unit of Work.&lt;br /&gt;&lt;br /&gt;Transactions can be divided into two categories.&lt;br /&gt;&lt;br /&gt;1.Local Transactions: These transactions are confined to the objects which reside inside one particular JVM.&lt;br /&gt;&lt;br /&gt;2.Global Transactions:These transactions may encapsulate objects which are distributed on various JVM's.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/interviewquestions/jdbcinterview.html"&gt;Many More Interview Questions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-7335827368248334522?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/7335827368248334522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/04/jdbc-interview-questions-and-answers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7335827368248334522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7335827368248334522'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/04/jdbc-interview-questions-and-answers.html' title='JDBC Interview Questions and Answers'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-1514282090645562302</id><published>2009-04-27T01:17:00.001-07:00</published><updated>2009-04-27T01:17:51.163-07:00</updated><title type='text'>Microsoft may be a winner in Oracle-Sun deal</title><content type='html'>Microsoft Corp. has had few critics more vociferious than Oracle CEO Larry Ellison and Sun Chairman Scott McNealy. So with Oracle planning to acquire Sun, Microsoft should be worried, right?&lt;br /&gt;&lt;br /&gt;Not necessarily.&lt;br /&gt;&lt;br /&gt;If Oracle retools itself as a full-fledged systems vendor, as Ellison suggested that it might, hardware makers such as Dell Inc. and Hewlett-Packard Co. might cozy up more with Microsoft as a business partner.&lt;br /&gt;&lt;br /&gt;HP and Oracle teamed up last year to roll out the jointly branded Database Machine and Exadata Storage Server, which combine Oracle's software and HP's ProLiant servers. Oracle is selling the systems, while HP handles delivery and services the hardware.&lt;br /&gt;&lt;br /&gt;But Sanford C. Bernstein &amp; Co. analyst Toni Sacconaghi wrote in a research note last week that HP "is likely to push alternatives to [Oracle] when possible, given that they are now direct competitors in the hardware space."&lt;br /&gt;&lt;br /&gt;"The hardware business is king [for server vendors], and anything that threatens that becomes your mortal enemy," noted Miko Matsumura, a former Sun executive who is deputy chief technology officer at Software AG.&lt;br /&gt;&lt;br /&gt;Some analysts expect Oracle to sell Sun's hardware business to a company such as Fujitsu Ltd., which makes Sparc-based systems. But Ellison, while not divulging any Sparc-related plans, said that the acquisition could enable Oracle to develop fully integrated systems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-1514282090645562302?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/1514282090645562302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/04/microsoft-may-be-winner-in-oracle-sun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1514282090645562302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1514282090645562302'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/04/microsoft-may-be-winner-in-oracle-sun.html' title='Microsoft may be a winner in Oracle-Sun deal'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-1929718017001179514</id><published>2009-04-14T23:10:00.000-07:00</published><updated>2009-04-14T23:14:08.063-07:00</updated><title type='text'>You may be a victim of software counterfeiting</title><content type='html'>This copy of windows did not pass genuine windows validation.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Ask for genuine microsoft software&lt;/span&gt;&lt;br /&gt;To fix and Resolve the problem you may follow these steps:&lt;br /&gt;&lt;br /&gt;After installing your genuine copy of Microsoft Windows XP you are prompted with a “Your software is counterfeit” error message at startup. Even after visiting the &lt;a href="http://www.microsoft.com/genuine/"&gt;www.microsoft.com/genuine/&lt;/a&gt; site and validating, you still get the above message popping up after 2 or 3 boots. There is an easy solution to this and I would like you to follow the steps below to fix the issue. &lt;p&gt;1. &lt;u&gt;C:\Windows\Downloaded Program Files&lt;/u&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Within that folder, remove any files or folders associated with &lt;code&gt;.WGA&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;2. &lt;u&gt;Safe Mode&lt;/u&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Reboot your computer and as soon as Windows logs off, start repeatively tapping the F8 Key on your keyboard.&lt;/li&gt;&lt;li&gt;As soon as you see the Windows Advanced Startup options select &lt;u&gt;Safe Mode&lt;/u&gt; within Safe Mode get yourself into these folders…&lt;/li&gt;&lt;li&gt;&lt;u&gt;C:\Windows\System32&lt;/u&gt; (&lt;strong&gt;Rename wgatray.exe to wgatrayold.exe&lt;/strong&gt;)&lt;/li&gt;&lt;li&gt;&lt;u&gt;C:\Windows\System32\dllcache&lt;/u&gt; (&lt;strong&gt;Rename wgatray.exe to wgatrayold.exe&lt;/strong&gt;)&lt;br /&gt;Note: Dllcache is a hidden folder, to view hidden folders do the following, go to Start, Control Panel, Folder Options,&lt;br /&gt;Select the view Tab and under the Hidden Files option, select Show hidden files and folders&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;3. &lt;u&gt;Safe Mode Registry&lt;/u&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Click on Start, Run and within the open dialog box type &lt;u&gt;regedit&lt;/u&gt; and click OK.&lt;/li&gt;&lt;li&gt;Within the Registry Editor navigate your self to&lt;br /&gt;&lt;code&gt;HKEY_Local_Machine\Software\Microsoft\WindowsNT\CurrentVersion\Winlogon\Notify\WGALOGON&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Right Click and Export the WGALOGON Folder (&lt;u&gt;this should be saved onto your machine for backup purposes&lt;/u&gt;)&lt;/li&gt;&lt;li&gt;After Exporting the folder, &lt;strong&gt;DELETE&lt;/strong&gt; the WGALOGON folder&lt;/li&gt;&lt;li&gt;After deleting close all applications and Restart your machine back to Normal Mode&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;4. &lt;u&gt;&lt;a href="http://www.microsoft.com/genuine"&gt;www.microsoft.com/genuine&lt;/a&gt;&lt;/u&gt;&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Get into the site above and manually re-validate your copy of Windows.&lt;/li&gt;&lt;li&gt;After being prompt of a successful validation, Restart your Machine.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-1929718017001179514?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/1929718017001179514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/04/you-may-be-victim-of-software.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1929718017001179514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1929718017001179514'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/04/you-may-be-victim-of-software.html' title='You may be a victim of software counterfeiting'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-7961399358492035586</id><published>2009-04-11T21:03:00.000-07:00</published><updated>2009-04-11T21:05:26.388-07:00</updated><title type='text'>Advantage of Hibernate over JDBC</title><content type='html'>&lt;span&gt;&lt;span style="font-size:85%;"&gt;&lt;ol start="1" type="1"&gt;&lt;li&gt;Hibernate provides data base independent          query mechanism but JDBC does not. You need          to write database specific query.&lt;/li&gt;&lt;li&gt;Hibernate treats tables as objects and so          you can work with classes and objects instead          of queries and result sets but its not so          with jdbc.&lt;/li&gt;&lt;li&gt;Hibernate provides its own powerful query          language called HQL (Hibernate Query Language).          Using HQL you can express queries in a familiar          SQL like syntax. It selects the best way          to execute the database operations. JDBC          supports only native Structured Query Language          (SQL) and you need to write the effective          query to access database.&lt;/li&gt;&lt;li&gt;Hibernate eliminates need for repetitive          SQL.&lt;/li&gt;&lt;li&gt;Hibernate provides API to handle all create-read-update-delete          (CRUD) operations i.e. no SQL is required.&lt;/li&gt;&lt;li&gt;Hibernate makes the development fast because          it relieves you from manual handling of persistent          data&lt;/li&gt;&lt;li&gt;You don’t require query tuning because          hibernate does it automatically using Criteria          Queries. But you need to tune queries while          using jdbc.&lt;/li&gt;&lt;li&gt;Hibernate supports query caching for better          performance.&lt;/li&gt;&lt;li&gt;Hibernate provides connection pooling by          just mentioning a few lines in configuration          file. But you need to write connection pooling          code in case of jdbc.&lt;/li&gt;&lt;li&gt;XML file in hibernate lets you specify all          configuration information and relations between          tables, which increases the readability and          allows changes more easily.&lt;/li&gt;&lt;li&gt;Hibernate supports lazy loading. Objects          can also be loaded on startup by turning          off the lazy attribute. Jbdc does not support          it.&lt;/li&gt;&lt;li&gt;Hibernate supports Automatic Versioning and          Time Stamping but jdbc does not.&lt;/li&gt;&lt;/ol&gt;For More Details You can visit to www.worldinfosoft.com&lt;br /&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/8368035411264836475-7961399358492035586?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/7961399358492035586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/04/advantage-of-hibernate-over-jdbc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7961399358492035586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7961399358492035586'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/04/advantage-of-hibernate-over-jdbc.html' title='Advantage of Hibernate over JDBC'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-2915353884330259326</id><published>2009-03-22T07:40:00.000-07:00</published><updated>2009-03-30T22:44:44.293-07:00</updated><title type='text'>Java Technology Blogs: Core JAVA Interview Questions &amp; Answers-2</title><content type='html'>&lt;a href="http://worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;Java Technology Blogs: Core JAVA Interview Questions &amp;amp; Answers-2&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-2915353884330259326?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/2915353884330259326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/03/java-technology-blogs-core-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/2915353884330259326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/2915353884330259326'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/03/java-technology-blogs-core-java.html' title='Java Technology Blogs: Core JAVA Interview Questions &amp; Answers-2'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4121222727006677719</id><published>2009-03-15T00:35:00.000-07:00</published><updated>2009-03-15T01:05:30.892-07:00</updated><title type='text'>WorldInfoSoft.com</title><content type='html'>WORLDINFOSOFT.COM is the very good tutorial site, where you can found many more tutorial about&lt;br /&gt;&lt;a href="http://worldinfosoft.com/corejava/"&gt;core java&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/jsp/"&gt;jsp&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/servlet/"&gt;servlet&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/php/"&gt;php&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/mysql/"&gt;mysql&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/j2me/"&gt;j2me&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/advancedjava/"&gt;advance java&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/j2ee/"&gt;j2ee&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/swing/"&gt;swing&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/c/"&gt;c&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/c++/"&gt;c++&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/html/"&gt;html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/xhtml/"&gt;xhtml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/dhtml/"&gt;dhtml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/xml/"&gt;xml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/wml/"&gt;wml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/xslt/"&gt;xslt&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/css-script/"&gt;css &lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/jdbc/"&gt;jdbc&lt;/a&gt;&lt;br /&gt;&lt;a href="http://worldinfosoft.com/hibernate/"&gt;hibernate&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4121222727006677719?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4121222727006677719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/03/worldinfosoftcom.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4121222727006677719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4121222727006677719'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/03/worldinfosoftcom.html' title='WorldInfoSoft.com'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-5507255899100659443</id><published>2009-01-25T22:52:00.000-08:00</published><updated>2009-03-15T00:35:28.565-07:00</updated><title type='text'>Core JAVA Interview Questions &amp; Answers-1</title><content type='html'>&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;meta name="verify-v1" content="ifGDA1XzcINhYwG8oiGRr4a694iWn1Cw54lX0cce9c0=" /&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;What is the most important feature of Java? &lt;/b&gt;&lt;br /&gt;Java is a platform independent language. &lt;/li&gt;&lt;li&gt;&lt;b&gt;What do you mean by platform independence? &lt;/b&gt;&lt;br /&gt;Platform independence means that we can write and compile the java code in one  platform like (Windows) and we can execute the class in any other supported  platform like (Linux, Solaris etc).&lt;/li&gt;&lt;li&gt;&lt;b&gt;Is JVM platform independent?&lt;/b&gt;&lt;br /&gt;JVM is not platform independent. It is a platform specific run time  implementation provided by the vendor.&lt;/li&gt;&lt;li&gt;&lt;b&gt;What is a JVM?&lt;/b&gt;&lt;br /&gt;JVM is Java Virtual Machine which is a run time environment for the compiled  java class files.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Difference between JRE/JVM/JDK? &lt;/b&gt;To See in Details Click on this  Link:-&lt;b&gt; &lt;a href="http://javasks.blogspot.com/2009/01/difference-between-jre-jvm-and-jdk.html"&gt; http://javasks.blogspot.com/2009/01/difference-between-jre-jvm-and-jdk.html&lt;/a&gt;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;What is Externalizable?&lt;/b&gt; - Externalizable is an Interface that covers  Serializable Interface. It sends data into Streams in Compressed Format. It has  two methods, that is: writeExternal(ObjectOuput out) and  readExternal(ObjectInput in).&lt;/li&gt;&lt;li&gt;&lt;b&gt;What is a pointer and does Java support pointers? &lt;/b&gt;&lt;br /&gt;Pointer is a reference deal to a memory location. Improper treating of pointers  leads to memory escapes and reliability issues hence Java doesn't support the  usage of pointers. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Does Java support multiple inheritance?&lt;/b&gt;&lt;br /&gt;Java doesn't support multiple inheritance.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Is Java a pure object oriented language? &lt;/b&gt;&lt;br /&gt;Java is not a pure object oriented language because it uses primitive data  types.&lt;/li&gt;&lt;li&gt;&lt;b&gt;What is difference between Path and Classpath? &lt;/b&gt;&lt;br /&gt;Path and Classpath are operating system level environment variables. Path is  used define where the system can find the executables (.exe) files and Classpath  is used to specify the location .class files.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;script&gt;nautanki_session_id =25981;option="opt2";&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://www.nautanki.tv/site_media/js/nautankiwidget.js"&gt;&lt;/script&gt;&lt;br /&gt;For More Details: &lt;a href="http://www.worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;http://www.worldinfosoft.com/interviewquestions/corejavainterview.html&lt;/a&gt;&lt;br /&gt;&lt;/html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-5507255899100659443?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/5507255899100659443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-1.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/5507255899100659443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/5507255899100659443'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-1.html' title='Core JAVA Interview Questions &amp; Answers-1'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4866702952053673326</id><published>2009-01-25T22:51:00.000-08:00</published><updated>2009-02-16T10:51:33.506-08:00</updated><title type='text'>Core JAVA Interview Questions &amp; Answers-2</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;b&gt;Can there be an abstract class with no abstract methods in it?&lt;/b&gt; - Yes &lt;/li&gt;&lt;li&gt;&lt;b&gt;Can an Interface be final?&lt;/b&gt; - No &lt;/li&gt;&lt;li&gt;&lt;b&gt;What are local variables? &lt;/b&gt;&lt;br /&gt;Local variables are those which are declared within a block of code like  methods. Local variables should be initialized before accessing them. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Can an Interface have an inner class?&lt;/b&gt; - Yes. &lt;pre&gt; public interface xyz{&lt;br /&gt; static int i=0;&lt;br /&gt; void ss();&lt;br /&gt;&lt;br /&gt; class abc{&lt;br /&gt;  abc(){&lt;br /&gt;   int j;&lt;br /&gt;   System.out.println("In side the interface");&lt;br /&gt;  };&lt;br /&gt;&lt;br /&gt;  public static void main(String abc[]){&lt;br /&gt;   System.out.println("Interface is in");&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Can we define private and protected modifiers for variables in  interfaces?&lt;/b&gt; - No &lt;/li&gt;&lt;li&gt;&lt;b&gt;What modifiers are allowed for methods in an Interface?&lt;/b&gt; - Only public  and abstract modifiers are allowed for methods in interfaces. &lt;/li&gt;&lt;li&gt;&lt;b&gt;What is a local, member and a class variable?&lt;/b&gt; - Which variable  declared within a method that is called “local” variables, which variable  declared within the class (not within any methods) are called  “member”  variables (global variables) and which variables declared within the class (not  within any methods and are defined as “static”) are called class variables.&lt;/li&gt;&lt;li&gt;&lt;b&gt;What are the different identifier states of a Thread?&lt;/b&gt; - The different  identifiers of a Thread are: R - Running or runnable thread, S - Suspended  thread, CW - Thread waiting on a condition variable, MW - Thread waiting on a  monitor lock, MS - Thread suspended waiting on a monitor lock &lt;/li&gt;&lt;li&gt;&lt;b&gt;What are some alternatives to inheritance?&lt;/b&gt; - Delegation is an  alternative to inheritance. Delegation means that you include an instance of  another class as an instance variable, and forward messages to the instance. It  is often better than inheritance because it forces you to think about each  message you forward, because the instance is of a known class, rather than a new  class, and because it doesn’t force you to accept all the methods of the super  class: you can provide only the methods that really make sense. On the other  hand, it makes you write more code, and it is more difficult to re-use (because  it is not a subclass). &lt;/li&gt;&lt;li&gt;&lt;b&gt;What is instance variables? &lt;/b&gt;&lt;br /&gt;Instance variables are those variable which is defined at the class level.  Instance variables need not be initialized before using them as they are  automatically initialized to their default values.&lt;/li&gt;&lt;/ol&gt;For More: &lt;a href="http://worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;http://worldinfosoft.com/interviewquestions/corejavainterview.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4866702952053673326?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4866702952053673326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4866702952053673326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4866702952053673326'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-2.html' title='Core JAVA Interview Questions &amp; Answers-2'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-2705198946006950097</id><published>2009-01-25T22:50:00.000-08:00</published><updated>2009-03-27T22:05:19.138-07:00</updated><title type='text'>Core JAVA Interview Questions &amp; Answers-3</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;b&gt;What is constant variable in Java? &lt;/b&gt;&lt;br /&gt;The constant variable should be declared as static and final. So only one copy  of the variable exists for all instances of the class and the value can't be  changed.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Should a main method be mandatory declared in all java classes?&lt;/b&gt;&lt;br /&gt;No it is not required. main method should be defined only if the source class is  a java application.&lt;/li&gt;&lt;li&gt;&lt;b&gt;What is the return type of the main method?&lt;/b&gt;&lt;br /&gt;Main method doesn't return anything therefore it declared void.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Why is the main method declared static?&lt;/b&gt;&lt;br /&gt;main method is called by the JVM yet before the instantiation of the class hence  it is declared as static.&lt;/li&gt;&lt;li&gt;&lt;b&gt;What is the argument of main method?&lt;/b&gt;&lt;br /&gt;The main method accepts an array type of String object as an argument.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Can main method be overloaded? &lt;/b&gt;&lt;br /&gt;Yes. You can have any number of main methods with different method signature and  implementation in the class.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Can a main method be declared final? &lt;/b&gt;&lt;br /&gt;Yes. Any inheriting class will not be able to have it's own default main method.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Why isn’t there operator overloading?&lt;/b&gt; - Because C++ has proven by  example that operator overloading makes code almost impossible to maintain. In  fact there very nearly wasn’t even method overloading in Java, but it was  thought that this was too useful for some very basic methods like print(). Note  that some of the classes like DataOutputStream have unoverloaded methods like  writeInt() and writeByte(). &lt;/li&gt;&lt;li&gt;&lt;b&gt;How do I convert a numeric IP address like 192.168.10.204 into a hostname  like javasks.blogspot.com?&lt;/b&gt; &lt;pre&gt; String hostname = InetAddress.getByName("192.168.10.204").getHostName();&lt;br /&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;b&gt;Why do threads block on I/O?&lt;/b&gt; - Threads block on I/O (that is enters  in the waiting state) so that other threads may execute while the I/O operation  is performed. &lt;/li&gt;&lt;/ol&gt;For More: &lt;a href="http://worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;http://worldinfosoft.com/interviewquestions/corejavainterview.html&lt;/a&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!--&lt;br /&gt;google_ad_client = "pub-8068226165705721";&lt;br /&gt;/* 250x250, created 3/27/09 */&lt;br /&gt;google_ad_slot = "5153032927";&lt;br /&gt;google_ad_width = 250;&lt;br /&gt;google_ad_height = 250;&lt;br /&gt;//--&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&lt;br /&gt;src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-2705198946006950097?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/2705198946006950097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/2705198946006950097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/2705198946006950097'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-3.html' title='Core JAVA Interview Questions &amp; Answers-3'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-5231705353529576920</id><published>2009-01-25T22:48:00.000-08:00</published><updated>2009-02-16T10:50:48.802-08:00</updated><title type='text'>Core JAVA Interview Questions &amp; Answers-4</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;b&gt;What is synchronization and why is it important?&lt;/b&gt; - With respect to  multithreading, synchronization is the capability to control the access of  multiple threads to shared resources. Without synchronization, it is possible  for one thread to modify a shared object while another thread is in the process  of using or updating that object’s value. This often leads to significant  errors. &lt;/li&gt;&lt;li&gt;&lt;b&gt;Is null a keyword?&lt;/b&gt; - No, The null value is not a keyword. &lt;/li&gt;&lt;li&gt;&lt;b&gt;How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8  characters?&lt;/b&gt; - Unicode requires 16 bits and ASCII require 7 bits. while the  ASCII character set uses only 7 bits, it is usually represented as 8 bits. UTF-8  represents characters using 8, 16, and 18 bit patterns. UTF-16 uses 16-bit and  larger bit patterns. &lt;/li&gt;&lt;li&gt;&lt;b&gt;What are wrapped classes?&lt;/b&gt; - Wrapped classes are classes that allow  primitive types to be accessed as objects. &lt;/li&gt;&lt;li&gt;&lt;b&gt;What is a native method?&lt;/b&gt; - A native method is a method that is  implemented in a language other than Java. &lt;/li&gt;&lt;li&gt;&lt;b&gt;What is the catch or declare rule for method declarations?&lt;/b&gt; - If a  checked exception may be thrown within the body of a method, the method must  either catch the exception or declare it in its throws clause. &lt;/li&gt;&lt;li&gt;&lt;b&gt;What is the range of the char type?&lt;/b&gt; - The range of the char type is 0  to 2^16 - 1. &lt;/li&gt;&lt;/ol&gt;For More: &lt;a href="http://worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;http://worldinfosoft.com/interviewquestions/corejavainterview.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-5231705353529576920?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/5231705353529576920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/5231705353529576920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/5231705353529576920'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/core-java-interview-questions-answers-4.html' title='Core JAVA Interview Questions &amp; Answers-4'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-8081495991218434862</id><published>2009-01-23T11:27:00.000-08:00</published><updated>2009-01-23T11:41:12.818-08:00</updated><title type='text'>Difference Between jre jvm and jdk</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;JDK (Java Development Kit)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;JDK= JDK tools + JRE&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;JRE = JVM + Java Packages Classes(like util, math, lang, awt,swing etc)+runtime libraries.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JDK contains tools required to develop the Java programs, and JRE to run the programs. The tools include compiler (javac.exe), Java application launcher (java.exe), Appletviewer, etc…&lt;br /&gt;&lt;br /&gt;JAVA Compiler converts java code into byte code. and java application launcher opens a JRE, loads the class, and invokes its main method.&lt;br /&gt;&lt;br /&gt;If you want to write and compile your own programs, you need JDK. If you just want to run your java programs, JRE is sufficient. JRE is targeted for execution of Java files&lt;br /&gt;&lt;br /&gt;You can create a Java file (with the help of Java packages), compile a Java file and run a java file. JDK is mainly targeted for java development.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JRE (Java Runtime Environment)&lt;br /&gt;&lt;/span&gt;Java Runtime Environment contains JVM, class libraries, and other supporting files. It does not contain any development tools such as compiler, debugger, etc. Actually JVM runs the program, and it uses the class libraries, and other supporting files provided in JRE. If you want to run any java program, you need to have JRE installed in the system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JVM(Java Virtual Machine)&lt;/span&gt;&lt;br /&gt;The Java Virtual Machine provides a platform-independent way of executing code, programmers can concentrate on writing application, without having to be concerned with how or where it will run.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-8081495991218434862?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/8081495991218434862/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/difference-between-jre-jvm-and-jdk.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8081495991218434862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8081495991218434862'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/difference-between-jre-jvm-and-jdk.html' title='Difference Between jre jvm and jdk'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3687272175838424439</id><published>2009-01-23T11:15:00.000-08:00</published><updated>2009-03-01T21:12:51.875-08:00</updated><title type='text'>JDK Tools  and Utilities</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Basic Tools:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;javac&lt;/li&gt;&lt;li&gt;java &lt;/li&gt;&lt;li&gt;javadoc&lt;/li&gt;&lt;li&gt;apt&lt;/li&gt;&lt;li&gt;appletviewer&lt;/li&gt;&lt;li&gt;jar&lt;/li&gt;&lt;li&gt;jdb&lt;/li&gt;&lt;li&gt;javah&lt;/li&gt;&lt;li&gt;javap&lt;/li&gt;&lt;li&gt;extcheck&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Security Tools:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;keytool&lt;/li&gt;&lt;li&gt;jarsigner&lt;/li&gt;&lt;li&gt;policytool&lt;/li&gt;&lt;li&gt;kinit&lt;/li&gt;&lt;li&gt;klist&lt;/li&gt;&lt;li&gt;ktab&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Internationalization Tools:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;native2ascii&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Remote Method Invocation (RMI) Tools:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;rmic&lt;/li&gt;&lt;li&gt;rmiregistry&lt;/li&gt;&lt;li&gt;rmid&lt;/li&gt;&lt;li&gt;serialver&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java IDL and RMI-IIOP Tools&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;tnameserv&lt;/li&gt;&lt;li&gt;idlj&lt;/li&gt;&lt;li&gt;orbd&lt;/li&gt;&lt;li&gt;servertool&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java Deployment Tools&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;pack200&lt;/li&gt;&lt;li&gt;unpack200&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java Plug-in Tools&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;htmlconverter&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java Web Start Tools&lt;/span&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;javaws &lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;script&gt;nautanki_session_id =25981;option="opt2";&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://www.nautanki.tv/site_media/js/nautankiwidget.js"&gt;&lt;/script&gt;&lt;br /&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you can also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&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/8368035411264836475-3687272175838424439?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3687272175838424439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/jdk-tools-and-utilities.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3687272175838424439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3687272175838424439'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/jdk-tools-and-utilities.html' title='JDK Tools  and Utilities'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-5625012793902888081</id><published>2009-01-17T22:29:00.000-08:00</published><updated>2009-04-04T23:27:14.888-07:00</updated><title type='text'>Insert &amp; Retrieve Image using Servlet</title><content type='html'>This article show to you how to insert blob type image into mysql database table by using servlet and how to retrieve the image from table and display it on the browser. In this example servlet is used because it dynamically process the request and generate a response for java programming language. The API of the java servlet allow to software developer to add dynamic content to a web server using java. The main advantage of java servlet is, it can be executed to handle request and response objects and it can run independently.&lt;br /&gt;&lt;br /&gt;Now, you follow these steps to insert and retrieve image from database table:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;1. Create table in your database follow this query:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE `picture` (&lt;br /&gt;`id` int(10) NOT NULL auto_increment,&lt;br /&gt;`image` blob,&lt;br /&gt;PRIMARY KEY (`id`)&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. create a servlet to insert the image:&lt;/span&gt;&lt;br /&gt;&lt;table bg=""  border="1" style="color:pink;"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.sql.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;javax.servlet.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;javax.servlet.http.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public class &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;InsertImage &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;extends  &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;HttpServlet&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;doGet&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;HttpServletRequest request, HttpServletResponse response&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;throws &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ServletException, IOException&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;PrintWriter pw = response.getWriter&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String connectionURL = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"jdbc:mysql://localhost:3306/test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Connection con=&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Class.forName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.newInstance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;con = DriverManager.getConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;connectionURL, &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;PreparedStatement ps = con.prepareStatement&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"INSERT INTO pictures VALUES(?,?)"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;File file = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;File&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"C:/images/5.jpg"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;FileInputStream fs = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;FileInputStream&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;file&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ps.setInt&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;1&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ps.setBinaryStream&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,fs,fs.available&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;())&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;int &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i = ps.executeUpdate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;i!=&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;pw.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"image inserted successfully"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;else&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;pw.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"problem in image insertion"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Exception e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. create web.xml file in WEB-INF folder of your tomcat server and put this code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-name&amp;gt;InsertImage&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;InsertImage&amp;lt;/servlet-&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/servlet&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-name&amp;gt;InsertImage&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;url-pattern&amp;gt;/InsertImage&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-8068226165705721"; /* 250x250, created 3/27/09 */ google_ad_slot = "5153032927"; google_ad_width = 250; google_ad_height = 250; //--&gt;&lt;br /&gt;&lt;/script&gt;&lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;br /&gt;&lt;/script&gt;&lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-8068226165705721"; /* 250x250, created 3/27/09 */ google_ad_slot = "5153032927"; google_ad_width = 250; google_ad_height = 250; //--&gt;&lt;br /&gt;&lt;/script&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;4. create one more servlet for retrieve image from database table&lt;br /&gt;&lt;/span&gt;&lt;table bg=""  border="1" style="color:pink;"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;&lt;!-- start source code --&gt;&lt;br /&gt;&lt;td align="left" nowrap="nowrap" valign="top"&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.sql.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;javax.servlet.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;javax.servlet.http.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public class &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;RetreiveImage &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;extends  &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;HttpServlet&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;doGet&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;HttpServletRequest request, HttpServletResponse response&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;throws &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ServletException, IOException&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(63, 127, 95);"&gt;//PrintWriter pw = response.getWriter();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String connectionURL = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"jdbc:mysql://localhost:3306/test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.sql.Connection con=&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Class.forName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.newInstance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;con=DriverManager.getConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;connectionURL,&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Statement st1=con.createStatement&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ResultSet rs1 = st1.executeQuery&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"select image from pictures where id='1'"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String imgLen=&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rs1.next&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;imgLen = rs1.getString&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;imgLen.length&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;())&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rs1 = st1.executeQuery&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"select image from pictures where id='1'"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;if&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rs1.next&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;int &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;len = imgLen.length&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;byte &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[] &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rb = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;byte&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;len&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;InputStream readImg = rs1.getBinaryStream&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;int &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;index=readImg.read&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rb, &lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, len&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"index"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+index&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;st1.close&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.reset&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.setContentType&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"image/jpg"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.getOutputStream&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.write&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rb,&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,len&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;response.getOutputStream&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.flush&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;        &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Exception e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;e.printStackTrace&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/code&gt;   &lt;/td&gt;&lt;br /&gt;&lt;!-- end source code --&gt;&lt;br /&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;5. put this code in to your web.xml file:&lt;/span&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;br /&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-name&amp;gt;RetreiveImage&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;RetreiveImage&amp;lt;/servlet-&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;class&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/servlet&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-mapping&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;servlet-name&amp;gt;RetreiveImage&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;url-pattern&amp;gt;/RetreiveImage&amp;lt;/url-pattern&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6. Compile both servlet file into classes folder by command prompt as:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;E:\apache-tomcat-6.0.14\webapps\sandeep\WEB-INF\classes&gt; javac InsertImage.java&lt;br /&gt;&lt;br /&gt;and&lt;br /&gt;&lt;br /&gt;E:\apache-tomcat-6.0.14\webapps\sandeep\WEB-INF\classes&gt; javac RetreiveImage.java&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;7. Run your server by startup.bat file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8. Open your browser and type on url address:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;http:\\localhost:8080\sandeep\InsertImage&lt;br /&gt;&lt;br /&gt;then you will got a success message&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9. and then run the RetreiveImage servlet to display your image on browser by&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;http:\\localhost:8080\sandeep\RetreiveImage&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10. Finally you will see the image on your browser&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_cJCwva3jGrU/SXLpGVcHMvI/AAAAAAAAACA/MCFfTHqK_Go/s1600-h/100_0887.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://1.bp.blogspot.com/_cJCwva3jGrU/SXLpGVcHMvI/AAAAAAAAACA/MCFfTHqK_Go/s320/100_0887.jpg" alt="" id="BLOGGER_PHOTO_ID_5292548807157297906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com/"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&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/8368035411264836475-5625012793902888081?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/5625012793902888081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/insert-retrieve-image-using-servlet.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/5625012793902888081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/5625012793902888081'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/insert-retrieve-image-using-servlet.html' title='Insert &amp; Retrieve Image using Servlet'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_cJCwva3jGrU/SXLpGVcHMvI/AAAAAAAAACA/MCFfTHqK_Go/s72-c/100_0887.jpg' height='72' width='72'/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-6106453428360971076</id><published>2009-01-05T07:58:00.000-08:00</published><updated>2009-01-05T08:04:02.983-08:00</updated><title type='text'>JDBC Insert Query Example</title><content type='html'>&lt;table border="1" bgcolor="pink"&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;   &lt;code&gt;&lt;br /&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;java.sql.* ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;class &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;JDBCInsert&lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;  &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;public static &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;main&lt;/span&gt;&lt;span style="color:#000000;"&gt;( &lt;/span&gt;&lt;span style="color:#000000;"&gt;String args&lt;/span&gt;&lt;span style="color:#000000;"&gt;[] ){&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;Class.forName&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;Connection conn = DriverManager.getConnection&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"jdbc:mysql://localhost:3306/dbName"&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"root"&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"root"&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;Statement stmt = conn.createStatement&lt;/span&gt;&lt;span style="color:#000000;"&gt;() &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;int &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;rows = stmt.executeUpdate&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"INSERT INTO tableName VALUES (4, 'sandeep')"&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;System.out.println&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;rows + &lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;" Rows modified"&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;stmt.close&lt;/span&gt;&lt;span style="color:#000000;"&gt;() &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;conn.close&lt;/span&gt;&lt;span style="color:#000000;"&gt;() &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;SQLException se&lt;/span&gt;&lt;span style="color:#000000;"&gt;) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;System.out.println&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"SQL Exception:"&lt;/span&gt;&lt;span style="color:#000000;"&gt;+se&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;Exception e&lt;/span&gt;&lt;span style="color:#000000;"&gt;){&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;System.out.println&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;e&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;  &lt;/span&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-6106453428360971076?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/6106453428360971076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/jdbc-insert-query-example.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6106453428360971076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6106453428360971076'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/jdbc-insert-query-example.html' title='JDBC Insert Query Example'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-7017097938482175084</id><published>2009-01-05T07:43:00.000-08:00</published><updated>2009-01-05T07:49:06.386-08:00</updated><title type='text'>JDBC Update Query Example</title><content type='html'>&lt;table bgcolor="pink" border="1"&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;java.sql.* ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;class &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;JDBCUpdate&lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;  &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;public static &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;main&lt;/span&gt;&lt;span style="color:#000000;"&gt;( &lt;/span&gt;&lt;span style="color:#000000;"&gt;String args&lt;/span&gt;&lt;span style="color:#000000;"&gt;[] ){&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;Class.forName&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color:#000000;"&gt;)&lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;Connection conn = DriverManager.getConnection&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"jdbc:mysql://localhost:3306/dbName"&lt;/span&gt;&lt;span style="color:#000000;"&gt;,&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"root"&lt;/span&gt;&lt;span style="color:#000000;"&gt;, &lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"root"&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;Statement stmt = conn.createStatement&lt;/span&gt;&lt;span style="color:#000000;"&gt;() &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;int &lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;rows = stmt.executeUpdate&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"UPDATE tableName SET columnName='' WHERE columnName=''"&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;System.out.println&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;rows + &lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;" Rows modified"&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;stmt.close&lt;/span&gt;&lt;span style="color:#000000;"&gt;() &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;conn.close&lt;/span&gt;&lt;span style="color:#000000;"&gt;() &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;SQLException se&lt;/span&gt;&lt;span style="color:#000000;"&gt;) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;System.out.println&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#2a00ff;"&gt;"SQL Exception:"&lt;/span&gt;&lt;span style="color:#000000;"&gt;+se&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;} &lt;/span&gt;&lt;span style="color:#7f0055;"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;Exception e&lt;/span&gt;&lt;span style="color:#000000;"&gt;){&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;      &lt;/span&gt;&lt;span style="color:#000000;"&gt;System.out.println&lt;/span&gt;&lt;span style="color:#000000;"&gt;(&lt;/span&gt;&lt;span style="color:#000000;"&gt;e&lt;/span&gt;&lt;span style="color:#000000;"&gt;) &lt;/span&gt;&lt;span style="color:#000000;"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;    &lt;/span&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ffffff;"&gt;  &lt;/span&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#000000;"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-7017097938482175084?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/7017097938482175084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/jdbc-update-query-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7017097938482175084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7017097938482175084'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/jdbc-update-query-example.html' title='JDBC Update Query Example'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-1284177768407392627</id><published>2009-01-04T08:13:00.000-08:00</published><updated>2009-01-04T08:33:39.570-08:00</updated><title type='text'>JDBC Prepared Statement Example</title><content type='html'>&lt;table bgcolor="pink"&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;   &lt;span style="color: rgb(0, 0, 0);"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;  &lt;span style="color: rgb(0, 0, 0);"&gt;java.sql.*;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public class &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;JDBCPreparedStatement &lt;/span&gt;    &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public static &lt;/b&gt;&lt;/span&gt;   &lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;main&lt;/span&gt;   &lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;  &lt;span style="color: rgb(0, 0, 0);"&gt;String args&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[]){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Class.forName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Connection c = DriverManager.getConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"jdbc:mysql://localhost:3306/test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;PreparedStatement stmt = c.prepareStatement&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"select * from tableName"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ResultSet rs = stmt.executeQuery&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;while&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rs.next&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rs.getInt&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+ &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;" (" &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+ rs.getString&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+ &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;")"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SQLException e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.err.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-1284177768407392627?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/1284177768407392627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/jdbc-prepared-statement-example.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1284177768407392627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1284177768407392627'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/jdbc-prepared-statement-example.html' title='JDBC Prepared Statement Example'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-8202919516891045109</id><published>2009-01-04T05:05:00.000-08:00</published><updated>2009-01-04T05:16:59.199-08:00</updated><title type='text'>MySQL Create Database</title><content type='html'>&lt;ul&gt;&lt;li&gt;In this example we are creating a databse table for establishing the connection with MySQL database by using the JDBC driver. A database is a  large collection of data or information stored in our computer in a specified manner. It helps us for accessing, managing and updating the data easily. A RDBMS (Relational Database Management System) is a type of DBMS (Database Management System) which stores the data in the form of tables. So, we can view and use the same database in many different ways. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The following example Shows to you how to create a database in MYSQL:&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="pink" align="center"&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.sql.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public class &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;CreateDatabase&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public static &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;main&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[] &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;args&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Connection conn = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String url = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"jdbc:mysql://localhost:3306/"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String dbname = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String driver = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String user = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String pass = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Connection con = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Class.forName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;con = DriverManager.getConnection &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;url+dbname,user,pass&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;try&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Statement st = con.createStatement&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;BufferedReader bf = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;BufferedReader&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;new &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;InputStreamReader&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.in&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;))&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"Enter Database name:"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String database = bf.readLine&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;st.executeUpdate&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"CREATE DATABASE "&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+database&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"Dtabase Created Successfully"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SQLException s&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;/span&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"SQL Exception!"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Exception e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;){&lt;/span&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;e.printStackTrace&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-8202919516891045109?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/8202919516891045109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/mysql-create-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8202919516891045109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8202919516891045109'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/mysql-create-database.html' title='MySQL Create Database'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-8872371818034144976</id><published>2009-01-04T02:56:00.000-08:00</published><updated>2009-01-04T04:46:48.474-08:00</updated><title type='text'>Data Retrieval Process of JDBC</title><content type='html'>&lt;span style="font-weight: bold;"&gt;There are the following steps are used by jdbc to retrieve the data&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;A JDBC driver would be loaded&lt;/li&gt;&lt;li&gt;Using the DriverManager a database Connection object would be created&lt;/li&gt;&lt;li&gt;Using the Connection object a Statement object would be created&lt;/li&gt;&lt;li&gt;Using the Statement object a SQL Select statement would be executed&lt;/li&gt;&lt;li&gt;SQL select statement returned a ResultSet&lt;/li&gt;&lt;li&gt;The ResultSet would be used to returned the rows  and examine the data.&lt;/li&gt;&lt;/ol&gt;This example illustrates how to create a connection from database table and how to access row of the table:&lt;br /&gt;&lt;br /&gt;&lt;table  style="width: 484px; height: 482px;color:pink;" bgcolor="pink" align="center"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;import &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;java.sql.*;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public class &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;JDBCMysqlConnection &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;public static &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;void &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;main&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;( &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String args&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[]) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Connection conn = &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;null&lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String url = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"jdbc:mysql://localhost:3306/"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String dbname = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"test"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String driver = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String user = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;; &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;String pass = &lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"root"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;try &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Class.forName&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;driver&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.newInstance&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;con = DriverManager.getConnection&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;url+dbname,user,pass&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Statement stmt = con.createStatement&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;ResultSet rs = stmt.executeQuery&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"select * from tableName"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;while &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;rs.next&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;System.out.println&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"Name= " &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+ rs.getString&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(42, 0, 255);"&gt;"name"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;))&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SQLException e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;e.printStackTrace&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;catch &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Exception e&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;e.printStackTrace&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;} &lt;/span&gt;&lt;span style="color: rgb(127, 0, 85);"&gt;&lt;b&gt;finally &lt;/b&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;      &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;con.close&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;()&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-8872371818034144976?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/8872371818034144976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2009/01/data-retrieval-process-of-jdbc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8872371818034144976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8872371818034144976'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2009/01/data-retrieval-process-of-jdbc.html' title='Data Retrieval Process of JDBC'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-7955999362712282256</id><published>2008-12-30T08:22:00.000-08:00</published><updated>2008-12-30T08:27:08.890-08:00</updated><title type='text'>Four Steps for Java Database Connectivity</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 10"&gt;&lt;meta name="Originator" content="Microsoft Word 10"&gt;&lt;link rel="File-List" href="file:///C:%5CDOCUME%7E1%5Csam%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml"&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceType"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PlaceName"&gt;&lt;/o:smarttagtype&gt;&lt;o:smarttagtype namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"&gt;&lt;/o:smarttagtype&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;  &lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if !mso]&gt;&lt;object classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id="ieooui"&gt;&lt;/object&gt; &lt;style&gt; st1\:*{behavior:url(#ieooui) } &lt;/style&gt; &lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman"; 	mso-fareast-font-family:"Times New Roman";} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:1441488180; 	mso-list-type:hybrid; 	mso-list-template-ids:28229536 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} @list l1 	{mso-list-id:2085953929; 	mso-list-type:hybrid; 	mso-list-template-ids:1952900766 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l1:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:.5in; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:Symbol;} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal"&gt;Before you can create a java jdbc connection to the database, you must first import the&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;java.sql package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;import java.sql.*; &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The star ( * ) indicates that all of the classes in the package java.sql are to be imported.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;1. Loading database driver&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;In this step we load the driver class by calling &lt;b style=""&gt;Class.forName()&lt;/b&gt; with the Driver class name as an argument. Once loaded, the Driver class creates an instance of itself. A user can connect to Database Server through JDBC Driver. Since most of the Database servers support ODBC driver therefore &lt;st1:place&gt;&lt;st1:placename&gt;JDBC-ODBC&lt;/st1:placename&gt;  &lt;st1:placetype&gt;Bridge&lt;/st1:placetype&gt;&lt;/st1:place&gt; driver is commonly used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The return type of the Class.forName (String ClassName) method is “Class”. Class is in class &lt;b style=""&gt;java.lang&lt;/b&gt; package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;try {&lt;/p&gt;  &lt;p class="MsoNormal"&gt;      &lt;span style=""&gt;&lt;/span&gt;Class.forName(”sun.jdbc.odbc.JdbcOdbcDriver”); &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;}&lt;o:p&gt;&lt;/o:p&gt; catch(Exception e) {      &lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;      System.out.println(“Driver class not loaded!”);&lt;o:p&gt;&lt;/o:p&gt;  &lt;p class="MsoNormal"&gt;}&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;2. Creating a oracle jdbc Connection&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The JDBC DriverManager class defines objects which can connect Java applications to a JDBC driver. DriverManager is considered the backbone of JDBC architecture. DriverManager class manages the JDBC drivers that are installed on the system. Its getConnection() method is used to establish a connection to a database. It uses a username, password, and a jdbc url to establish a connection to the database and returns a connection object. A jdbc Connection represents a session/connection with a specific database. Within the context of a Connection, SQL, PL/SQL statements are executed and results are returned. An application can have one or more connections with a single database, or it can have many connections with different databases. A Connection object provides metadata i.e. information about the database, tables, and fields. It also contains methods to deal with transactions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JDBC URL Syntax::&lt;span style=""&gt;    &lt;/span&gt;jdbc: &lt;subprotocol&gt;: &lt;subname&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JDBC URL Example:: jdbc: &lt;subprotocol&gt;: &lt;subname&gt;•Each driver has its own subprotocol&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;•Each subprotocol has its own syntax for the source. We’re using the jdbc odbc subprotocol, so the DriverManager knows to use the sun.jdbc.odbc.JdbcOdbcDriver.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;try{&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;    Connection dbConnection=DriverManager.getConnection(url,”userName”,”Password”)&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;}catch(SQLException e) {&lt;/p&gt;  &lt;p class="MsoNormal"&gt;      &lt;span style=""&gt;&lt;/span&gt;System.out.println( “Driver class not loaded!” );&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;}&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;3. Creating a jdbc Statement object&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Once a connection is established we can interact with the database. Connection interface defines methods for interacting with the database via the established connection. To execute SQL statements, you need to instantiate a Statement object from your connection object by using the createStatement() method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Statement statement = dbConnection.createStatement();&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;A statement object is used to send and execute SQL statements to a database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Three kinds of Statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;Statement:&lt;/b&gt; It execute simple sql      queries without parameters. Statement createStatement() Creates an SQL Statement      object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;Prepared Statement:&lt;/b&gt; It execute      precompiled sql queries with or without parameters. PreparedStatement      prepareStatement(String sql) returns a new PreparedStatement object.      PreparedStatement objects are precompiled SQL statements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;Callable Statement:&lt;/b&gt; It execute for      call to a database stored procedure. CallableStatement prepareCall(String      sql) returns a new CallableStatement object. CallableStatement objects are      SQL stored procedure call statements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;4. Executing a SQL statement with the Statement object, and returning a jdbc resultSet.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Statement interface defines methods that are used to interact with database via the execution of SQL statements. The Statement class has three methods for executing statements:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;ul style="margin-top: 0in;" type="disc"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;executeQuery()&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;executeUpdate()&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;b style=""&gt;execute()&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;For a SELECT statement, the method to use is executeQuery . For statements that create or modify tables, the method to use is executeUpdate. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Note: Statements that create a table, alter a table, or drop a table are all examples of DDL&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;statements and are executed with the method executeUpdate. execute() executes an SQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;statement that is written as String object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;ResultSet provides access to a table of data generated by executing a Statement. The table rows are retrieved in sequence. A ResultSet maintains a cursor pointing to its current row of data. The next() method is used to successively step through the rows of the tabular results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;span style="font-size: 12pt; font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;ResultSetMetaData Interface holds information on the types and properties of the columns in a ResultSet. It is constructed from the Connection object.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-7955999362712282256?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/7955999362712282256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/four-steps-for-java-database.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7955999362712282256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7955999362712282256'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/four-steps-for-java-database.html' title='Four Steps for Java Database Connectivity'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4360236439432199085</id><published>2008-12-30T07:58:00.001-08:00</published><updated>2009-03-01T21:13:50.305-08:00</updated><title type='text'>Java DataBase Connectivity</title><content type='html'>&lt;ul&gt;&lt;li&gt;JDBC is a Java API for executing SQL statements and supports basic SQL functionality. The JDBC ( Java Database Connectivity) API defines interfaces and classes for writing database applications in Java by making database connections. Using JDBC you can send SQL, PL/SQL statements to almost any relational database. It provides RDBMS access by allowing you to embed SQL inside Java code. Because Java can run on a thin client, applets embedded in Web pages can contain downloadable JDBC code to enable remote database access. You will learn how to create a table, insert values into it, query the table, retrieve results, and update the table with the help of a JDBC Program example.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;JDBC Architecture&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cJCwva3jGrU/SVpF_PgOliI/AAAAAAAAABI/grbDoQ1QdJA/s1600-h/jdbc.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 81px;" src="http://3.bp.blogspot.com/_cJCwva3jGrU/SVpF_PgOliI/AAAAAAAAABI/grbDoQ1QdJA/s320/jdbc.gif" alt="" id="BLOGGER_PHOTO_ID_5285614065468479010" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;In This jdbc architecture programmer connect his/her application to database by using the jdbc driver. Java application calls the JDBC library. JDBC loads a driver which talks to the database.&lt;br /&gt;&lt;br /&gt;                                                                                                Fig: JDBC Architecture&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;script&gt;nautanki_session_id =25981;option="opt2";&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://www.nautanki.tv/site_media/js/nautankiwidget.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4360236439432199085?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4360236439432199085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/java-database-connectivity.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4360236439432199085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4360236439432199085'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/java-database-connectivity.html' title='Java DataBase Connectivity'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cJCwva3jGrU/SVpF_PgOliI/AAAAAAAAABI/grbDoQ1QdJA/s72-c/jdbc.gif' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3974850746883318977</id><published>2008-12-30T07:15:00.000-08:00</published><updated>2009-03-12T11:45:26.224-07:00</updated><title type='text'>How to install Java?</title><content type='html'>&lt;h3&gt;&lt;span style="font-size:100%;"&gt;What is Java and why do I need it?&lt;/span&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Java is a programming language that allows programs to be written that can then be run on more than one type of operating system. A program written in Java can run on Windows, UNIX, Linux etc. as long as there is a Java runtime environment installed.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;span style="font-size:100%;"&gt;Where can I download Java?&lt;/span&gt;&lt;br /&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;You can download JRE version 6 update 11 from this url:- &lt;a href="http://java.sun.com/javase/downloads/index.jsp"&gt;http://java.sun.com/javase/downloads/index.jsp&lt;/a&gt;&lt;/li&gt;&lt;li&gt;If you want to be able to write your own Java programs that you can compile and run, then you must download the &lt;b&gt;SDK&lt;/b&gt; (Software Developers Kit) from this url:- &lt;a href="http://java.sun.com/j2se/1.4.2/download.html"&gt;http://java.sun.com/j2se/1.4.2/download.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Path Setting of Java&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Windows 2000/XP&lt;/span&gt; users may set their path by right-clicking on 'My Computer' and selecting 'Properties'. Under the 'Advanced' tab, there is a button that allows you to set the 'Environment variables'. Click on this and alter the 'Path' variable so that it also contains the path to the Java executable. For example, if you have installed Java in c:\jdk  and your path is currently set to C:\WINDOWS\SYSTEM32, then you would change your path to read C:\WINDOWS\SYSTEM32;c:\jdk\bin&lt;br /&gt;When you open a new command prompt, it will reflect these changes and allow you to run java programs by typing "java". If you have installed the SDK, then you will also be able to run "javac" to compile stuff. &lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Windows 95/98/ME&lt;/span&gt; users may find that their path variable is stored in a different place. Edit the c:\autoexec.bat file and add the following line at the end: SET PATH=%PATH%;c:\jdk\bin&lt;br /&gt;(This also assumes that you have installed Java in c:\jdk) .&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Linux, UNIX, Solaris, FreeBSD&lt;/span&gt; users must set their PATH variable to point to where the java binaries have been installed. Please refer to your shell documentation if you have trouble doing this. For example, if you use bash as your shell, then you would add the following line to the end of your .bashrc: export PATH=/path/to/java:$PATH.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;script&gt;nautanki_session_id =25981;option="opt3";&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://www.nautanki.tv/site_media/js/nautankiwidget.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3974850746883318977?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3974850746883318977/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/how-to-install-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3974850746883318977'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3974850746883318977'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/how-to-install-java.html' title='How to install Java?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3826633617291027526</id><published>2008-12-28T08:15:00.000-08:00</published><updated>2008-12-28T08:16:46.419-08:00</updated><title type='text'>History of Java</title><content type='html'>Java was started in June 1991 by James Gosling as a project called "Oak". The main goal of Gosling to implement a virtual machine and a language that had a familiar C-like notation but with greater uniformity and simplicity than C/C++. The first public implementation was Java 1.0 in 1995. It's main objective of "Write Once, Run Anywhere", with free runtimes on any platforms that's why it called platform independent. To develop a large web application Sun invented the J2EE and J2ME.&lt;br /&gt;&lt;br /&gt;New versions for large and small platforms (J2EE and J2ME) soon were designed with the advent of "Java 2".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://java.sun.com/j2se/1.4.2/download.html"&gt;&lt;span style="font-weight: bold;"&gt;Download SDK and JRE&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3826633617291027526?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3826633617291027526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/history-of-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3826633617291027526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3826633617291027526'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/history-of-java.html' title='History of Java'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-7323367933070519958</id><published>2008-12-28T06:28:00.000-08:00</published><updated>2009-02-25T21:06:21.877-08:00</updated><title type='text'>What are Access Specifiers available in Java?</title><content type='html'>&lt;ul&gt;&lt;li&gt;Access specifiers are keywords that determines the type of access to the member of a class. These are:&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;Public&lt;/li&gt;&lt;li&gt;Protected&lt;/li&gt;&lt;li&gt;Private&lt;/li&gt;&lt;li&gt;Defaults&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&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/8368035411264836475-7323367933070519958?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/7323367933070519958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-are-access-specifiers-available-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7323367933070519958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/7323367933070519958'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-are-access-specifiers-available-in.html' title='What are Access Specifiers available in Java?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3632403889590157265</id><published>2008-12-28T05:47:00.000-08:00</published><updated>2008-12-28T05:57:26.287-08:00</updated><title type='text'>Explain about the Encapsulation in java</title><content type='html'>&lt;ul style="color: rgb(0, 0, 0);"&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Encapsulation is a process of binding or wrapping the data and the codes that operates on the data into a single entity. This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper. &lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3632403889590157265?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3632403889590157265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/explain-about-encapsulation-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3632403889590157265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3632403889590157265'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/explain-about-encapsulation-in-java.html' title='Explain about the Encapsulation in java'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-6256207927461780859</id><published>2008-12-28T05:44:00.000-08:00</published><updated>2008-12-28T06:00:05.911-08:00</updated><title type='text'>How to explain garbage collection?</title><content type='html'>&lt;ul style="color: rgb(0, 0, 0);"&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Collection is one of the most important feature of     Java. Garbage collection is also called automatic memory management as JVM automatically     removes the unused variables/objects (value is null) from the memory. User     program cann't directly free the object from memory, instead it is the job     of the garbage collector to automatically  into a     variable when no more in use. I Java on calling&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;free the objects that are no     longer referenced by a program. Every class inherits finalize()     method from java.lang.Object, the finalize() method is called by     garbage collector when it determines no more references to the object     exists. In Java, it is good idea to explicitly assign nullSystem.gc() and Runtime.gc(),      JVM tries to recycle the unused objects, but there is no guarantee when all     the objects will garbage collected.&lt;/span&gt; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-6256207927461780859?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/6256207927461780859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/how-to-explain-garbage-collection.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6256207927461780859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6256207927461780859'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/how-to-explain-garbage-collection.html' title='How to explain garbage collection?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-951678227919022578</id><published>2008-12-28T05:41:00.000-08:00</published><updated>2008-12-28T06:01:02.232-08:00</updated><title type='text'>Explain about user defined Exceptions?</title><content type='html'>&lt;ul style="color: rgb(0, 0, 0);"&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;User defined Exceptions are the separate Exception classes     defined by the user for specific purposed. An user defined can created by     simply sub-classing it to the Exception class. This allows custom exceptions     to be generated (using throw) and caught in the same way as normal     exceptions. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;     Example:&lt;br /&gt;&lt;br /&gt;   class myCustomException extends Exception {&lt;br /&gt;                 // The class simply has to exist to be an exception   &lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-951678227919022578?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/951678227919022578/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/explain-about-user-defined-exceptions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/951678227919022578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/951678227919022578'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/explain-about-user-defined-exceptions.html' title='Explain about user defined Exceptions?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-1001899516508760682</id><published>2008-12-28T05:37:00.000-08:00</published><updated>2008-12-28T06:11:58.196-08:00</updated><title type='text'>What is Synchronization in java?</title><content type='html'>&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Synchronization is a process of controlling the access of     shared resources by the multiple threads in such a manner that only one     thread can access one resource at a time. In non synchronized multithreaded     application, it is possible for one thread to modify a shared object while     another thread is in the process of using or updating the object's value.     Synchronization prevents such type of data corruption.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(0, 0, 0);"&gt;E.g. Synchronizing a function:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    public synchronized void Method1 () {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;            // Appropriate method-related code.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    } &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: rgb(0, 0, 0);"&gt;E.g. Synchronizing a block of code inside a function:&lt;/span&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;   &lt;/b&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;public myFunction (){&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;        synchronized (this) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                   //     Synchronized code here.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;             }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;    }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-1001899516508760682?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/1001899516508760682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-synchronization-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1001899516508760682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/1001899516508760682'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-synchronization-in-java.html' title='What is Synchronization in java?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-714399503944241899</id><published>2008-12-28T05:35:00.000-08:00</published><updated>2009-03-27T21:47:07.031-07:00</updated><title type='text'>What is transient variable?</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Transient&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;variable can't be serialize. For example if a     variable is declared as transient in a Serializable class and the class is     written to an ObjectStream, the value of the variable can't be written to     the stream instead when the class is retrieved from the ObjectStream the     value of the variable becomes &lt;/span&gt;&lt;b style="color: rgb(0, 0, 0);"&gt;null&lt;/b&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;script&gt;nautanki_session_id =25981;option="opt2";&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://www.nautanki.tv/site_media/js/nautankiwidget.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;&lt;!--&lt;br /&gt;google_ad_client = "pub-8068226165705721";&lt;br /&gt;/* 250x250, created 3/27/09 */&lt;br /&gt;google_ad_slot = "5153032927";&lt;br /&gt;google_ad_width = 250;&lt;br /&gt;google_ad_height = 250;&lt;br /&gt;//--&gt;&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript"&lt;br /&gt;src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;&lt;br /&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-714399503944241899?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/714399503944241899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-transient-variable.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/714399503944241899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/714399503944241899'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-transient-variable.html' title='What is transient variable?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3024297274742587856</id><published>2008-12-28T05:30:00.000-08:00</published><updated>2009-02-25T20:54:02.885-08:00</updated><title type='text'>Difference between an Abstract class and Interface?</title><content type='html'>Differences:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Interfaces provide a form of multiple inheritance. A class can extend only one other class.&lt;/li&gt;&lt;li&gt;Interfaces are limited to public methods and constants with no implementation. Abstract classes can have a partial implementation, protected parts, static methods, etc.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;A Class may implement several interfaces. But in case of abstract class, a class may extend only one abstract class.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Interfaces are slow as it requires extra indirection to to find corresponding method in in the actual class. Abstract classes are fast. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Similarities:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Neither Abstract classes or Interface can be instantiated.&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&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/8368035411264836475-3024297274742587856?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3024297274742587856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/difference-between-abstract-class-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3024297274742587856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3024297274742587856'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/difference-between-abstract-class-and.html' title='Difference between an Abstract class and Interface?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3119712734883700195</id><published>2008-12-28T05:29:00.000-08:00</published><updated>2009-02-25T21:02:39.944-08:00</updated><title type='text'>What is Collection API?</title><content type='html'>&lt;span style="color: rgb(0, 0, 128);"&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;The Collection API is a set of classes and interfaces that     support operation on collections of objects. These classes and interfaces     are more flexible, more powerful, and more regular than the vectors, arrays,     and hashtables if effectively replaces.&lt;br /&gt;&lt;br /&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://worldinfosoft.com"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&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/8368035411264836475-3119712734883700195?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3119712734883700195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-collection-api.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3119712734883700195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3119712734883700195'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-collection-api.html' title='What is Collection API?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4727933959398574400</id><published>2008-12-27T11:33:00.000-08:00</published><updated>2008-12-28T05:53:36.039-08:00</updated><title type='text'>Polymorphism in java</title><content type='html'>&lt;span style=""&gt;&lt;span style="font-family:Helvetica;"&gt;Polymorphism, allows the software developer to reuse names as well as code.&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="font-family:Arial,Helvetica;"&gt;&lt;b&gt; &lt;/b&gt;Polymorphism is a natural consequence  of specialization (sub classing relationship implemented via inheritance), the associated principle of substitutability, and message passing.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);" &gt;&lt;span style="font-weight: bold;"&gt;Different forms of Polymorphism:-&lt;/span&gt; From a practical programming viewpoint, polymorphism exists in three distinct forms in Java:   &lt;/span&gt;&lt;ul style="color: rgb(0, 0, 0);"&gt;    &lt;li&gt;Method overloading     &lt;/li&gt;&lt;li&gt;Method overriding through inheritance     &lt;/li&gt;&lt;li&gt;Method overriding through the Java interface&lt;/li&gt;   &lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4727933959398574400?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4727933959398574400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/polymorphism-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4727933959398574400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4727933959398574400'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/polymorphism-in-java.html' title='Polymorphism in java'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-8604561298906117866</id><published>2008-12-27T11:29:00.000-08:00</published><updated>2009-02-25T21:06:03.579-08:00</updated><title type='text'>Abstract class in java</title><content type='html'>Java Abstract classes are used to declare common characteristics of subclasses. An abstract class cannot be instantiated. It can only be used as a superclass for other classes that extend the abstract class. Abstract classes are declared with the abstract keyword. Abstract classes are used to provide a template or design for concrete subclasses down the inheritance tree.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;abstract class testAbstractClass {&lt;br /&gt;      protected String myString;&lt;br /&gt;      public String getMyString() {&lt;br /&gt;          return myString;&lt;br /&gt;          }&lt;br /&gt;      public abstract string anyAbstractFunction();&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&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/8368035411264836475-8604561298906117866?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/8604561298906117866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/abstract-class-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8604561298906117866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8604561298906117866'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/abstract-class-in-java.html' title='Abstract class in java'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-8060922159144164772</id><published>2008-12-27T09:44:00.001-08:00</published><updated>2008-12-27T09:49:43.983-08:00</updated><title type='text'>What is a Package?</title><content type='html'>A package is a namespace for organizing classes and interfaces in a logical manner. Placing your code into packages makes large software projects easier to manage. The Java platform provides an enormous class library (a set of packages) suitable for use in your own applications. This library is known as the "Application Programming Interface(API) ". Its packages represent the tasks most commonly associated with general-purpose programming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-8060922159144164772?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/8060922159144164772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-package.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8060922159144164772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8060922159144164772'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-package.html' title='What is a Package?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-8539460361297256004</id><published>2008-12-27T09:42:00.000-08:00</published><updated>2009-03-01T21:16:25.570-08:00</updated><title type='text'>What is Inheritance?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_cJCwva3jGrU/SVZxOgU4a-I/AAAAAAAAABA/PvgBfVyMHw4/s1600-h/inheritance.gif"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 153px;" src="http://3.bp.blogspot.com/_cJCwva3jGrU/SVZxOgU4a-I/AAAAAAAAABA/PvgBfVyMHw4/s320/inheritance.gif" alt="" id="BLOGGER_PHOTO_ID_5284535706775481314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Inheritance provides a powerful and natural mechanism for organizing and structuring your software. It is the capability of a class to use the properties and methods of another class while adding its own functionality. Object-oriented programming allows classes to &lt;i&gt;inherit&lt;/i&gt; commonly used state and  behavior from other classes by the "extends" keyword. In the image we see 'duck', 'cuckoo' and 'ostrich' inherit the all properties of 'bird' which is the super class and the 'duck', 'cuckoo' and 'ostrich' are the sub class. For Example:&lt;br /&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;public class duck extends bird&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;public class cuckoo extends bird&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;public class ostrich extends bird&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;script&gt;nautanki_session_id =25981;option="opt2";&lt;/script&gt;&lt;br /&gt;&lt;script type="text/javascript" src="http://www.nautanki.tv/site_media/js/nautankiwidget.js"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-8539460361297256004?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/8539460361297256004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-inheritance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8539460361297256004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/8539460361297256004'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-inheritance.html' title='What is Inheritance?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_cJCwva3jGrU/SVZxOgU4a-I/AAAAAAAAABA/PvgBfVyMHw4/s72-c/inheritance.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-6584688834116784155</id><published>2008-12-27T09:40:00.000-08:00</published><updated>2008-12-27T10:54:54.295-08:00</updated><title type='text'>What is Interface?</title><content type='html'>&lt;span style="color: rgb(0, 0, 0);"&gt;An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior of the interface. Interfaces are similar to abstract classes but all methods are &lt;/span&gt;&lt;em style="color: rgb(0, 0, 0);"&gt;abstract&lt;/em&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; and all properties are &lt;/span&gt;&lt;em style="color: rgb(0, 0, 0);"&gt;static final&lt;/em&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;. As an example, we will build a &lt;/span&gt;&lt;em style="color: rgb(0, 0, 0);"&gt;Working&lt;/em&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; interface for the subclasses of Man. Since this interface has the method called &lt;/span&gt;&lt;em style="color: rgb(0, 0, 0);"&gt;work()&lt;/em&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;, that method must be defined in any class using the Working interface.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0);"&gt;public interface Working {&lt;br /&gt; public void work();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div style="text-align: justify; color: rgb(0, 0, 0);"&gt;When you create a class that uses an interface, you reference the interface with the reserved word implements Interface_list. Interface_list is one or more interfaces as multiple interfaces are allowed. Any class that implements an interface must include code for all methods in the interface. This ensures commonality between interfaced objects.&lt;br /&gt;&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0);"&gt;public class WorkingMan extends Man implements Working {&lt;br /&gt;public WorkingMan(String name) {&lt;br /&gt;  super(name);&lt;br /&gt;}&lt;br /&gt;public void work(){&lt;br /&gt;  speak();&lt;br /&gt;  System.out.println("interface implemented");&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-6584688834116784155?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/6584688834116784155/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-interface.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6584688834116784155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6584688834116784155'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-interface.html' title='What is Interface?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-3539510056562021668</id><published>2008-12-27T09:39:00.000-08:00</published><updated>2008-12-27T10:59:14.528-08:00</updated><title type='text'>What is class?</title><content type='html'>A class is a blueprint or prototype from which objects are created. In the real world, you'll often find many individual objects all of the same kind.&lt;br /&gt;The following Bicycle  class is one possible implementation of a bicycle:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;class Bicycle {&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      int cadence = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      int speed = 0;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      int gear = 1;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      void changeCadence(int newValue) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;           cadence = newValue;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      void changeGear(int newValue) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;           gear = newValue;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      void speedUp(int increment) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;           speed = speed + increment;  &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      void applyBrakes(int decrement) {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;           speed = speed - decrement;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      void printStates() {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;           System.out.println("cadence:"+cadence+" speed:"+speed+" gear:"+gear);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;      }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-3539510056562021668?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/3539510056562021668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-class.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3539510056562021668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/3539510056562021668'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-class.html' title='What is class?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-4892846026793599993</id><published>2008-12-27T09:37:00.000-08:00</published><updated>2008-12-28T00:33:38.906-08:00</updated><title type='text'>What is Object?</title><content type='html'>An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. Real-world objects share two characteristics: They all have &lt;i&gt;state&lt;/i&gt; and &lt;i&gt;behavior&lt;/i&gt;. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes). Identifying the state and behavior for real-world objects is a great way to begin thinking in terms of object-oriented programming.&lt;br /&gt;&lt;p&gt; Bundling code into individual software objects provides a number of benefits, including:  &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Modularity:&lt;/span&gt; The source code for an object can be written and maintained independently of the source code for other objects. Once created, an object can be easily passed around inside the system. &lt;p&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Information-hiding:&lt;/span&gt; By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world. &lt;p&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Code re-use:&lt;/span&gt; If an object already exists (perhaps written by another software developer), you can use that object in your program. This allows specialists to implement/test/debug complex, task-specific objects, which you can then trust to run in your own code. &lt;p&gt; &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Pluggability and debugging ease:&lt;/span&gt; If a particular object turns out to be problematic, you can simply  remove it from your application and plug in a different object as its replacement.  This is analogous to fixing mechanical problems in the real world. If a bolt breaks, you replace &lt;i&gt;it&lt;/i&gt;, not the entire machine.  &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-4892846026793599993?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/4892846026793599993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-object.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4892846026793599993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/4892846026793599993'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-object.html' title='What is Object?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-19351802940267601</id><published>2008-12-27T06:55:00.000-08:00</published><updated>2008-12-27T07:40:01.277-08:00</updated><title type='text'>Features of Java</title><content type='html'>&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Easy to Use:-&lt;/span&gt; The fundamentals of Java is based on c++ programming language. The c++ programming language is based on Object oriented so, it is easy to handle by programmer.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Reliability:-&lt;/span&gt;  Java needed to reduce the fatal errors from programmer mistakes. With this in mind, object-oriented programming was introduced. Once data and its manipulation were packaged together in one place, it increased Java’s robustness.&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Secure:-&lt;/span&gt; As Java was originally targeting mobile devices that would be exchanging data over networks, it was built to include a high level of security. Java is probably the most secure programming language to date.&lt;/li&gt;&lt;li&gt; &lt;span style="font-weight: bold;"&gt;Platform Independent:-&lt;/span&gt; Java was written to be a portable language that doesn't care about the operating system or the hardware of the computer. It can be run on any operating system and any machine.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-19351802940267601?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/19351802940267601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/features-of-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/19351802940267601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/19351802940267601'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/features-of-java.html' title='Features of Java'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8368035411264836475.post-6079189764023518980</id><published>2008-12-27T06:40:00.000-08:00</published><updated>2009-03-15T01:19:29.813-07:00</updated><title type='text'>What is Java?</title><content type='html'>&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;meta name="verify-v1" content="ifGDA1XzcINhYwG8oiGRr4a694iWn1Cw54lX0cce9c0=" /&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Java is a “high-level” computer programming language.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It has a set of rules that determine how the instructions are written. These rules are known as its “syntax”.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The high-level instructions are translated into numeric codes that computers can understand and execute.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Java was created by a team led by James Gosling for Sun Microsystems. When Java 1.0 was released to the public in 1996, its main focus had shifted to use on the Internet. It provided more interactivity with users by giving developers a way to produce animated webpages.&lt;/li&gt;&lt;li&gt;Java source code files (with a .java extension) are compiled into a format called bytecode (with a .class extension), which can then be executed by a Java interpreter. Compiled Java code can run on most computers because Java interpreters and runtime environments, known as Java Virtual Machines (JVM), exist for most operating systems, including UNIX, the Macintosh OS, and Windows. Bytecode can also be converted directly into machine language instructions by a just-in-time compiler (JIT).&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;For more details you can visit: &lt;/span&gt;&lt;/span&gt;&lt;a href="http://www.worldinfosoft.com/interviewquestions/corejavainterview.html"&gt;http://www.worldinfosoft.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a one of the best tutorial site, where you can find lots of example with full description of code and you van also prepare of your interview from this site &lt;span style="font-weight: bold;"&gt;WORLDINFOSOFT.COM&lt;/span&gt;.&lt;br /&gt;&lt;span style="color: rgb(0, 0, 128);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/html&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8368035411264836475-6079189764023518980?l=javasks.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javasks.blogspot.com/feeds/6079189764023518980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-java.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6079189764023518980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8368035411264836475/posts/default/6079189764023518980'/><link rel='alternate' type='text/html' href='http://javasks.blogspot.com/2008/12/what-is-java.html' title='What is Java?'/><author><name>Sandeep Kumar</name><uri>http://www.blogger.com/profile/03172442107136869636</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_cJCwva3jGrU/SaYhsb3C3OI/AAAAAAAAAC8/sC2WQ3bbSRc/S220/sandeep.jpg'/></author><thr:total>1</thr:total></entry></feed>
