<?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:blogger='http://schemas.google.com/blogger/2008' 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-1246487936314048633</id><updated>2018-09-17T14:08:01.768+05:30</updated><category term="Java Quiz"/><category term="Java"/><category term="Information Is Wealth"/><category term="Good Health"/><category term="J2EE"/><category term="Help In Need Is A Help Indeed"/><category term="ABOUT ME"/><category term="BLOG&#39;s OBJECTIVE"/><category term="J2EE-Patterns"/><category term="LINKS EXCHANGE"/><category term="Preparing For Certification"/><category term="Ubuntu"/><title type='text'>Help To The Needed.</title><subtitle type='html'>A virtual place to offload thoughts...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default?start-index=26&amp;max-results=25'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>63</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-8141067226721145457</id><published>2011-12-04T00:25:00.004+05:30</published><updated>2011-12-04T00:40:27.046+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE-Patterns"/><title type='text'>Classic Singleton example</title><content type='html'>&lt;div&gt;A classic and fool-proof example of Singleton sample is as follows,&lt;br /&gt;&lt;br /&gt;Considering that we need to create a singleton for an Employee object(some POJO, for easier understanding), a Singleton can be expressed as,&lt;br /&gt;&lt;br /&gt;class SampleSingleton{&lt;br /&gt;      private static Employee empObject= new Employee();&lt;br /&gt;      public static Employee getEmployee(){&lt;br /&gt;             return empObject;&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;On start up, I create a singleton object and assign it to the empObject, and each time I only send that single object to the caller.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/8141067226721145457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=8141067226721145457&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8141067226721145457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8141067226721145457'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2011/12/classic-singleton-example.html' title='Classic Singleton example'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-4384951637612393835</id><published>2011-08-04T17:38:00.005+05:30</published><updated>2011-08-04T17:42:46.086+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Deadlock via Threads sample</title><content type='html'>A sample demonstration of deadlock.&lt;br /&gt;Here it goes.&lt;br /&gt;&lt;br /&gt;public class DeadlockSample {&lt;br /&gt;   &lt;br /&gt;    public static void main(String[] args) {&lt;br /&gt;        final DeadlockSample d = new DeadlockSample();&lt;br /&gt;        final DeadlockSample d1 = new DeadlockSample();&lt;br /&gt;        Thread t1 = new Thread() {&lt;br /&gt;            public void run() {&lt;br /&gt;                System.out.println(&quot;Thread t1 before entering synchronized block d&quot;);&lt;br /&gt;                synchronized (d) {&lt;br /&gt;                    System.out.println(&quot;Thread 1: locked d&quot;);&lt;br /&gt;&lt;br /&gt;                    try {&lt;br /&gt;                        Thread.sleep(50);&lt;br /&gt;                    } catch (InterruptedException e) {&lt;br /&gt;                    }&lt;br /&gt;                    System.out.println(&quot;Thread t1 before entering synchronized block d1&quot;);&lt;br /&gt;                    synchronized (d1) {&lt;br /&gt;                        System.out.println(&quot;Thread 1: locked d1&quot;);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;&lt;br /&gt;        Thread t2 = new Thread() {&lt;br /&gt;            public void run() {&lt;br /&gt;                System.out.println(&quot;Thread t2 before entering synchronized block d1&quot;);&lt;br /&gt;                synchronized (d1) {&lt;br /&gt;                    System.out.println(&quot;Thread 2: locked d1&quot;);&lt;br /&gt;&lt;br /&gt;                    try {&lt;br /&gt;                        Thread.sleep(50);&lt;br /&gt;                    } catch (InterruptedException e) {&lt;br /&gt;                    }&lt;br /&gt;                    System.out.println(&quot;Thread t2 before entering synchronized block d&quot;);&lt;br /&gt;                    synchronized (d) {&lt;br /&gt;                        System.out.println(&quot;Thread 2: locked d&quot;);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        };&lt;br /&gt;        t1.start();&lt;br /&gt;        t2.start();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;On execution,&lt;br /&gt;&lt;br /&gt;Thread t1 before entering synchronized block d&lt;br /&gt;Thread 1: locked d&lt;br /&gt;Thread t2 before entering synchronized block d1&lt;br /&gt;Thread 2: locked d1&lt;br /&gt;Thread t1 before entering synchronized block d1&lt;br /&gt;Thread t2 before entering synchronized block d&lt;br /&gt;&lt;br /&gt;and the program goes into a deadlock. Each Thread waits for the other to complete.</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/4384951637612393835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=4384951637612393835&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/4384951637612393835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/4384951637612393835'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2011/08/deadlock-via-threads-sample.html' title='Deadlock via Threads sample'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-8707538526823120649</id><published>2011-02-16T17:04:00.005+05:30</published><updated>2011-02-16T17:13:38.054+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>JDK, Ant and Tomcat6 installation in ubuntu</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Before a new installation  is to be done, I prefer to un install the previous versions.&lt;br /&gt;&lt;br /&gt;Open your Terminal(alt + shift + T) and do the following&lt;br /&gt;&lt;br /&gt;first remove any previous versions of java using the&lt;br /&gt;&lt;br /&gt;&quot;sudo apt-get remove sun-java6-&quot; command.&lt;br /&gt;&lt;br /&gt;Than to install a new version of java,&lt;br /&gt;&lt;br /&gt;type in&lt;br /&gt;&lt;br /&gt;&quot;sudo apt-get install sun-java6-jdk&quot;&lt;br /&gt;&lt;br /&gt;Type Y if prompted for Do u want to continue..&lt;br /&gt;&lt;br /&gt;This is the preferred jdk to work on.&lt;br /&gt;&lt;br /&gt;java Plugins can be added using the &quot;sudo apt-get install sun-java6-plugin &quot; command&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If we need to install ant, just enter &quot;sudo apt-get install ant&quot;&lt;br /&gt;&lt;br /&gt;Type Y if prompted for Do u want to continue..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To Install tomcat6,&lt;br /&gt;&lt;br /&gt;the command to be used is &quot;sudo apt-get install tomcat6&quot;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Cheers :D</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/8707538526823120649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=8707538526823120649&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8707538526823120649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8707538526823120649'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2011/02/jdk-installation-in-ubuntu.html' title='JDK, Ant and Tomcat6 installation in ubuntu'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-3247286454883017939</id><published>2011-02-10T22:12:00.002+05:30</published><updated>2011-02-10T22:52:24.882+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Help In Need Is A Help Indeed"/><title type='text'>Load Testing Tool For GWT</title><content type='html'>&lt;div&gt;Long time no see......&lt;/div&gt;&lt;div&gt;Wondering what I was doing so long??&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Well, lot of changes, actually..&lt;div&gt;I have moved over to using Ubuntu from Windows, and currently I am working on web app development using GWT, Spring and Hibernate.&lt;/div&gt;&lt;div&gt;Post application development, it&#39;s now the season of Testing!&lt;br /&gt;&lt;div&gt;&lt;div&gt;Currently, I am on  the lookout of a Load Testing tool for GWT.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Though there are tools out there in the web, search for a Load testing tool that uses GWT that supports Linux is getting more difficult each day..&lt;/div&gt;&lt;div&gt;This is my current status! &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Friends, In case you come across any Load testing tool, let me know.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;!!! HELP TO THE NEEDED !!!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/3247286454883017939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=3247286454883017939&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/3247286454883017939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/3247286454883017939'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2011/02/load-testing-tool-for-gwt.html' title='Load Testing Tool For GWT'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-3200128638900038820</id><published>2010-07-05T14:02:00.002+05:30</published><updated>2011-12-04T00:40:27.054+05:30</updated><title type='text'>MVC Design Pattern</title><content type='html'>&lt;div&gt;Originated from Smalltalk, MVC stands for Model-View-Controller.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Model:&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Denotes the data objects, model comprises of everything that&#39;s being modified and presented to the user.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;View:&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;View is the screen representation of the model. The current state of the data objects is presented using this object.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Controller:&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Controller defines the way the User Interface reacts o the input given by the user. the data objects (Model) is manipulated using the Controller component.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;strong&gt;Benefits of using the MVC:&lt;/strong&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Reliability(Clear seperation between the presentation and transaction layers)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;High reuse and Adaptability(Multiple types of views can be used with the same server-side code)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Very low development and life Cycle costs:(Even low level programmers can develop and maintain the UI)&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Rapid Deployment:(Development time can be reduced as UI designers focus)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/3200128638900038820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=3200128638900038820&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/3200128638900038820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/3200128638900038820'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2010/07/mvc-design-pattern.html' title='MVC Design Pattern'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-7104769628708448160</id><published>2010-05-11T14:07:00.008+05:30</published><updated>2010-05-11T14:36:57.285+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><title type='text'>CGI and Advantages Of Java Servlets Over Perl</title><content type='html'>&lt;strong&gt;CGI:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are two things a Web Server Application alone can&#39;t do:&lt;br /&gt;1) Generate Dynamic Content (generating dynamic / on-the-fly web pages)&lt;br /&gt;2) Perform Operations with form Data.&lt;br /&gt;To perform these operations, the web server application uses &lt;strong&gt;helper applications&lt;/strong&gt;.&lt;br /&gt;These helper Applications perform the operations and sends information back to the web server application. (The web server application thinks that the page received is just another static page.)&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;The non-Java term for the helper application is CGI(Common Gateway Interface).&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Most CGI programs were written using Perl and now I would like to bring out the advantages of Java over Perl.&lt;br /&gt;* Java is Performance effective. With Perl, the server has to launch a heavy weight process for each and every request for that resource.&lt;br /&gt;* Now we might get a thought that similarly in Java, each instance of the JVM would be a heavy weight process.&lt;br /&gt;* In our case, Servlets stay loaded only once. Client requests for a servlet resource are handled as seperate &lt;strong&gt;&lt;em&gt;Threads &lt;/em&gt;&lt;/strong&gt;of the single running Servlet. We don&#39;t have the overhead of starting the JVM and loading the class.&lt;br /&gt;* It can be pointed out that Web servers are able to keep a single Perl program running between clients, but, the point is not all web servers can do that. It&#39;s a special case which doesn&#39;t apply to all Perl CGI programs.&lt;br /&gt;* Furthermore, Servlets can be a J2EE Client, whereas a Perl CGI Program cannot!&lt;br /&gt;&lt;br /&gt;More to be discussed with respect to J2EE Clients.</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/7104769628708448160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=7104769628708448160&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/7104769628708448160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/7104769628708448160'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2010/05/cgi-advantages-of-java-servlets-over.html' title='CGI and Advantages Of Java Servlets Over Perl'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-2073789010000613776</id><published>2010-05-11T11:05:00.002+05:30</published><updated>2010-05-11T11:11:35.847+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><title type='text'>What&#39;s a MIME type</title><content type='html'>The &lt;b&gt;Content-Type &lt;/b&gt;response header&#39;s value in the HTTP Response is known as MIME type.&lt;div&gt;The MIME type tells the browser what kind of data the browser is about to receive so that the browser will know how to render that. The MIME type is any of the types sent in the HTTP Request&#39;s &quot;&lt;b&gt;Accept:&lt;/b&gt;&quot; Header.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Example: &lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the HTTP POST Request, if we have&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/&lt;/div&gt;&lt;div&gt;plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Content-Type: text/html&lt;/div&gt;&lt;div&gt;is the possible MIME type sent using the HTTP Response.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/2073789010000613776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=2073789010000613776&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2073789010000613776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2073789010000613776'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2010/05/whats-mime-type.html' title='What&#39;s a MIME type'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-1985668630545758475</id><published>2010-03-05T09:59:00.004+05:30</published><updated>2010-03-05T10:25:46.636+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Some Beautiful Web UI Options</title><content type='html'>I was on the look out for interesting and beautiful Web UI libraries for creating Rich Internet Applications, and I came across few options...&lt;br /&gt;&lt;br /&gt;I need to explore it further and try out samples...&lt;br /&gt;&lt;br /&gt;I would like to list the various options and give a brief idea based upon information collected online.&lt;br /&gt;If readers have come across any of those technologies, they could gladly join in.&lt;br /&gt;&lt;br /&gt;1. &lt;a href=&quot;http://vaadin.com/home&quot;&gt;IT Mill Toolkit&lt;/a&gt; (Now Called as Vaadin)&lt;br /&gt;IT Mill Toolkit is an open-source framework, providing widgets and tools for the development of Rich Internet Applications (RIAs). Delivers web applications without worrying about incompatibilities of web browsers, DOM or JavaScript by using standard Java tools.&lt;br /&gt;&lt;br /&gt;2. &lt;a href=&quot;http://livepipe.net/&quot;&gt;LivePipe UI &lt;/a&gt;&lt;br /&gt;LivePipe UI is a suite of high quality widgets and controls for web 2.0 applications built using the Prototype JavaScript Framework. Each control is well tested, highly extensible, fully documented and degrades gracefully for non JavaScript enabled browsers where possible&lt;br /&gt;&lt;br /&gt;3. &lt;a href=&quot;http://www.jitsu.org/&quot;&gt;Jitsu &lt;/a&gt;&lt;br /&gt;Jitsu contains an integrated set of tools to enable developers to build and deploy sophisticated user interfaces for web applications. These include an Xml markup language, page compiler, data binding engine, JavaScript runtime, control library, runtime inspector, animation engine, cross-platform library, Ajax, and back button support.&lt;br /&gt;&lt;br /&gt;4. &lt;a href=&quot;http://mochaui.com/&quot;&gt;MochaUI&lt;/a&gt;&lt;br /&gt;MochaUI is a web applications user interface library built on the Mootools JavaScript framework.Uses: web applications, web desktops, web sites, widgets, standalone windows and modal dialogs.&lt;br /&gt;&lt;br /&gt;5. &lt;a href=&quot;http://echo.nextapp.com/site/&quot;&gt;Echo Web Framework &lt;/a&gt;&lt;br /&gt;Echo is an open-source framework for developing rich web applications. From the developer&#39;s perspective, Echo behaves as a user interface toolkit--like Swing or Eclipse SWT. AJAX technology is employed to deliver a user experience to web clients that approaches that of desktop-based applications.&lt;br /&gt;&lt;br /&gt;6. &lt;a href=&quot;http://developer.yahoo.com/yui/&quot;&gt;The Yahoo! User Interface Library (YUI) &lt;/a&gt;&lt;br /&gt;The YUI Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. YUI is available under a BSD license and is free for all uses.&lt;br /&gt;&lt;br /&gt;7. &lt;a href=&quot;http://wui.sourceforge.net/wui-overview.php&quot;&gt;WUI Web UI Framework &lt;/a&gt;&lt;br /&gt;WUI (Web User Interface) is an MVC framework for writing web UIs in a single language: Java. Write web apps with components, widgets &amp;amp; events, not JSPs. Runs in any servlet 2.3 container. Similar to Model 2 / Struts, only better. Apache-style license.&lt;br /&gt;&lt;br /&gt;8. &lt;a href=&quot;http://butterfly.jenkov.com/webui/index.html&quot;&gt;Butterfly Web UI &lt;/a&gt;&lt;br /&gt;Butterfly Web UI is a component oriented web framework for Java, like Wicket or Tapestry. The main advantage compared to these frameworks is that Butterfly Web UI integrates naturally with Butterfly DI Container, giving you a state-of-the-art dependency injection container to help you structure and decouple the internal components of your web applications.&lt;br /&gt;&lt;br /&gt;Apart from the above, we also have &lt;a href=&quot;http://code.google.com/webtoolkit/overview.html&quot;&gt;GWT&lt;/a&gt;, &lt;a href=&quot;http://jquery.com/&quot;&gt;JQuery &lt;/a&gt;and &lt;a href=&quot;http://www.extjs.com/&quot;&gt;Extjs&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Information is wealth.. Kindly add information for better understanding of readers.&lt;br /&gt;If you have samples, you can mail it to me at&lt;br /&gt;&lt;a href=&quot;mailto:s.its.chandru@gmail.com&quot;&gt;s.its.chandru@gmail.com&lt;/a&gt;.&lt;br /&gt;I will ensure, it appears here under your name</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/1985668630545758475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=1985668630545758475&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/1985668630545758475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/1985668630545758475'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2010/03/some-beautiful-web-ui-options.html' title='Some Beautiful Web UI Options'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-409442936764465395</id><published>2009-10-05T10:11:00.002+05:30</published><updated>2009-10-05T10:28:20.828+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><title type='text'>J2EE Class -2</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;WEB BROWSER AND WEB SERVER:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* A web browser lets a user to request a resource. &lt;br /&gt;&lt;br /&gt;* The web server gets the request, finds the resource, and returns something back to the user. The returned resource can be a HTML page, a picture, a sound file or even a PDF document. The client asks for the resource and the server sends it back.&lt;br /&gt;&lt;br /&gt;In short, &lt;span style=&quot;font-weight:bold;&quot;&gt;A web server takes a client request and gives something back to the client.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;REASONS A WEB SERVER DOESN&#39;T SEND A RESOURCE:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* A server doesn&#39;t send a resource if its not there, or even if it’s not where the server is expecting it to be. &quot;&lt;span style=&quot;font-weight:bold;&quot;&gt;404 Not Found&lt;/span&gt;&quot; is the error response you get when the server can’t find what we asked for.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;WEB CLIENT:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* Clients mean both (or either) the human user and the browser application.&lt;br /&gt;&lt;br /&gt;* The browser is the piece of software (like Netscape or Mozilla) that knows how to communicate with the server. The browser’s other big job is interpreting the HTML code and rendering the web page for the user.&lt;br /&gt;&lt;br /&gt;* The client is the browser application doing what the user asked it to do.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;FUNCTIONALITY OF A WEB CLIENT:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A web client lets the user &lt;span style=&quot;font-weight:bold;&quot;&gt;request&lt;/span&gt; something on the server, and shows the user the &lt;span style=&quot;font-weight:bold;&quot;&gt;result&lt;/span&gt; of the request.&lt;br /&gt;&lt;br /&gt;* &lt;span style=&quot;font-weight:bold;&quot;&gt;CLIENTS AND SERVERS COMMUNICATE USING HTML and HTTP.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;HTML(HyperText Markup Language):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When a server answers a request,the server usually sends some type of content to the browser so that the browser can display it. Servers often send the browser a set of instructions written in HTML. The HTML tells the browser how to present the content to the user. All web browsers know what to do with HTML, although sometimes an older browser might not understand parts of a page that was written using newer versions of HTML.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;HTTP(HyperText Transfer Protocol):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most of the conversations held on the web between clients and servers are held using the HTTP protocol, which allows for simple request and response conversations. The client sends an HTTP request, and the server answers with an HTTP response. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;HTML and HTTP IN SHORT:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;if you’re a web server, you speak HTTP.&lt;br /&gt;When a web server sends an HTML page to the client, it sends it using HTTP. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/409442936764465395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=409442936764465395&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/409442936764465395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/409442936764465395'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/10/j2ee-class-2.html' title='J2EE Class -2'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-701637492066049832</id><published>2009-09-30T10:04:00.002+05:30</published><updated>2009-09-30T10:14:45.037+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="J2EE"/><title type='text'>J2EE Class -1</title><content type='html'>Dear friends,&lt;br /&gt;&lt;br /&gt;From today I would also like to focus on J2EE concepts.&lt;br /&gt;&lt;br /&gt;What all you need to learn:&lt;br /&gt;&lt;br /&gt;Besides your brain and a pencil, you also need Java, Tomcat 5, and a&lt;br /&gt;computer.You do not need any Integrated Development Environment like Eclipse, etc. I strongly recommend you, not to use anything but a basic editor until you complete the J2EE tutorial.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;GETTING THE SOFTWARE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* If you don’t already Java SE v1.5 or greater, you’ll need it.&lt;br /&gt;&lt;br /&gt;* If you don’t already have Tomcat 5, go get it from:&lt;span style=&quot;font-weight:bold;&quot;&gt;http://tomcat.apache.org/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* Select &quot;Tomcat v5.5&quot; in the Downloads menu on the left side of the home page.&lt;br /&gt;&lt;br /&gt;* Scroll down to the &quot;Binary Distributions&quot; section and download the version of your&lt;br /&gt;choice. If you do not know, then select the &quot;Core&quot; distribution; it is all you need.&lt;br /&gt;&lt;br /&gt;* Save the installation file in a temporary directory.&lt;br /&gt;&lt;br /&gt;* Install Tomcat.&lt;br /&gt;&lt;br /&gt;   --&gt; For Windows, that means double-clicking the install.exe file and following the&lt;br /&gt;   installer wizard instructions.&lt;br /&gt;&lt;br /&gt;   --&gt; For the others, unpack the install file into the place on your hard drive   &lt;br /&gt;   where you want Tomcat to be.&lt;br /&gt;&lt;br /&gt;* To make it easier to follow the book instructions, name the Tomcat home directory&lt;br /&gt;&quot;tomcat&quot;.&lt;br /&gt;&lt;br /&gt;* Set environment variables for JAVA_HOME and TOMCAT_HOME.&lt;br /&gt;&lt;br /&gt;Test Tomcat by launching the tomcat/bin/startup script (which is startup.sh) for&lt;br /&gt;Linux/Unix/OS X. Point your browser to:&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;http://localhost:8080/&lt;/span&gt; and you’ll see the Tomcat welcome page.</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/701637492066049832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=701637492066049832&amp;isPopup=true' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/701637492066049832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/701637492066049832'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/j2ee-class-1.html' title='J2EE Class -1'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6055598608635419154</id><published>2009-09-29T10:06:00.003+05:30</published><updated>2009-09-29T10:35:09.772+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>The To String method</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;The toString() Method&lt;/span&gt; Override toString() when we want to read something meaningful about the objects of our class. Code can call toString() on our object when it wants to read useful details about our object. &lt;br /&gt;&lt;br /&gt;To be more clear, Now when we pass an object reference to the System.out.println() method, and for example, the object&#39;s toString() method is called as follows,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;public class ClassA {&lt;br /&gt;   public static void main (String [] args) {&lt;br /&gt;     ClassA classA = new ClassA();&lt;br /&gt;     System.out.println(classA);&lt;br /&gt;   }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;then, Running the ClassA class gives us the following output,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;% Java ClassA&lt;br /&gt;ClassA@10b62c9&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The above output is what we get when we don&#39;t override the toString() method of class Object. It gives us the class name (at least that&#39;s meaningful) followed by the @ symbol, followed by the unsigned hexadecimal representation of the object&#39;s hashcode.&lt;br /&gt;&lt;br /&gt;Trying to read this output might motivate us to override the toString() method in our classes, for example,&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;public class ClassA {&lt;br /&gt;   public static void main (String[] args) {&lt;br /&gt;      ClassB classB = new ClassB(&quot;Test the toString method&quot;, new Date());&lt;br /&gt;      System.out.println(classB);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;class ClassB {&lt;br /&gt;   Date data1;&lt;br /&gt;   String data2;&lt;br /&gt;   ClassB(String data2, Date data1) {&lt;br /&gt;   this.data1 = data1;&lt;br /&gt;   this.data2 = data2;&lt;br /&gt;   }&lt;br /&gt;   public String toString() {&lt;br /&gt;      return (&quot;The main aim of this program is to &quot; + data2 +&lt;br /&gt;              &quot;. This program was written on &quot; + data1);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;The output of this would be a bit more readable:&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;% Java ClassA&lt;br /&gt;The main aim of this program is to Test the toString method. This program was written on Tue Sep 29 10:26:59 IST 2009&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For your Information, Some people refer the toString() method as the &quot;spill-your-guts method,&quot; since the most common implementations of toString() simply tell us the object&#39;s state.</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6055598608635419154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6055598608635419154&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6055598608635419154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6055598608635419154'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/to-string-method.html' title='The To String method'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-7368906416704479287</id><published>2009-09-24T09:59:00.007+05:30</published><updated>2009-10-12T08:41:52.882+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINKS EXCHANGE"/><title type='text'>LINKS EXCHANGE</title><content type='html'>Dear friends,&lt;br /&gt;&lt;br /&gt;Check for your links here, If you dont find them here, then I would be really pleased to share links with you.&lt;br /&gt;&lt;br /&gt;Currently blog is under updation,&lt;br /&gt;If you miss your link in my friends list kindly shout in my SHOUT BOX. I will add you.&lt;br /&gt;Sorry for the inconvinience.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.4feb.blogspot.com/&quot;&gt;4 Feb&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.9xhot.info/&quot;&gt;9 X Hot&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://aim-mba.blogspot.com/&quot;&gt;Aim – Mba&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://allakom.blogspot.com/&quot;&gt;All about Computers&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://applicationsandsoftwares.blogspot.com/&quot;&gt;Applications And Softwares&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://assassinscreed00.blogspot.com/&quot;&gt;Assasins&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.awake-studio.com/&quot;&gt;Awake Studio&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://beautiful-tourist-places.blogspot.com/&quot;&gt;Beautiful Tourist Places&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.comijam.org/&quot;&gt;Comijam&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://communicatebetter.blogspot.com/2008/05/my-links.html&quot;&gt;Communicate Better&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.aceptamostutarjeta.com/&quot;&gt;Computer Technology and Entertainment&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://cookieroa-18.blogspot.com/&quot;&gt;Cookie&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://cooltafreeh.blogspot.com/&quot;&gt;Cool Tafreeh&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ctexpeditions.com/&quot;&gt;Ctexpeditions&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://dayoday.blogspot.com/&quot;&gt;Day O Day&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.downloadgratis34.blogspot.com/&quot;&gt;Download Gratis34&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://dwisusilo.com/index.php/link-x-change&quot;&gt;Dwisusilo&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://e-browse.info/&quot;&gt;E- Browse&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://earnmoneyfromads.blogspot.com/&quot;&gt;Earn Money From Ads&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.edublawg.com/&quot;&gt;Edublawg&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://ekaputriani.blogspot.com/&quot;&gt;Ekaputriani&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://fashions-funda.blogspot.com/&quot;&gt;Fashions-Funda&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www-fastdiet.com/links/&quot;&gt;Fast Diet&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://fraudmamy.blogspot.com/&quot;&gt;Fraud Mamy&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.gamereview2u.co.cc/&quot;&gt;Game Review 2 U&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://games4x.blogspot.com/2008/04/link-banner-games.html&quot;&gt;Games 4x&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://gamezconsole.blogspot.com/&quot;&gt;Gamez Console&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://gearsofwar8081.blogspot.com/&quot;&gt;Gears Of War 8081&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://gratis-ebooks.blogspot.com/2009/05/link-exchange.html&quot;&gt;Gratis-Ebooks&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://hobbychaos.blogspot.com/&quot;&gt;Hobby Chaos&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://huihuiakatara.blogspot.com/&quot;&gt;Huihuiakatara&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://ilalangpagi.blogspot.com/2009/07/links-exchange-friends.html&quot;&gt;Ilalangpagi&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://indianrocksstar.blogspot.com/&quot;&gt;Indian Rocks Star&lt;/a&gt; &lt;br /&gt;&lt;a href=&quot;http://www.indoblogster.com/&quot;&gt;Indo Blogster&lt;/a&gt; &lt;br /&gt;&lt;a href=&quot;http://infoabtworld.blogspot.com/&quot;&gt;Info Abt World&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://infobyvicky.blogspot.com/&quot;&gt;Info By Vicky&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://kooooltime.blogspot.com/&quot;&gt;Kooool Time&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://kungfupanda81.blogspot.com/&quot;&gt;Kung fu Panda81&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://liezl-read-write.blogspot.com/&quot;&gt;Liezl Read Write&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ligayascorner.com/&quot;&gt;Ligaya&#39;s Corner&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://meinthedutchsociety.blogspot.com/&quot;&gt;Me In The Dutch Society&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.medicalcravings.com/&quot;&gt;Medical Cravings&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mimo9.com/&quot;&gt;Mimo 9&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://mrilham.com/link-exchange/&quot;&gt;Mrilham&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://musicandmovienews.blogspot.com/&quot;&gt;Music And Movie News&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.myfashionlink.com/&quot;&gt;My Fashion Link&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://emie-myrecollection.blogspot.com/&quot;&gt;My Recollection&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.mygossipgirl.com/&quot;&gt;My Gossip Girl&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://nadahima2.blogspot.com/&quot;&gt;Nadahima2&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://newyorkvisitor.blogspot.com/&quot;&gt;New York Visitor&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://niceevents.blogspot.com/&quot;&gt;Nice Events&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.nicethoughtsnthrills.blogspot.com/&quot;&gt;Nice Thoughts n Thrills&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.ourvotematters08.org/&quot;&gt;Our Vote Matters08&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.pacrim-entertainment.com/&quot;&gt;Pacrim-Entertainment&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://purebloodrayne.blogspot.com/&quot;&gt;Pure Blood Rayne&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://reeyou36.blogspot.com/&quot;&gt;Reeyou36&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://runeupload.net/&quot;&gt;Rune Upload&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.singlemomthoughts.com/&quot;&gt;Single Mom Thoughts&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://shalinisamuel.blogspot.com/&quot;&gt;Shalini Samuel&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.socketshield.com/&quot;&gt;Socket Shield&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://specialfoodworld.blogspot.com/&quot;&gt;Special Food World&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.studentsexclusive.co.cc/&quot;&gt;Students Exclusive&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.suresh.myjoyz.com/&quot;&gt;Suresh My Joyz&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.tamilcs.blogspot.com/&quot;&gt;Tamil CS&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://tamilthrill.com/&quot;&gt;Tamil Thrill&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://taskcricket.blogspot.com/&quot;&gt;Task Cricket&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://theglimpseofart.blogspot.com/&quot;&gt;The Glimpse Of Art&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://capbc.org&quot;&gt;The TECH Repository&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://thusoftcom.blogspot.com/2009/08/studio-matematika-math-studio.html&quot;&gt;Thu Soft Com&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://tutorial-tip-trik.blogspot.com/&quot;&gt;Tutorial-Tip-Trik&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.twinscolumn.com/&quot;&gt;Twins Column&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://vijaikiran.blogspot.com/&quot;&gt;Vijay Kiran&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://virtualbuzz.blogspot.com/&quot;&gt;Virtual Buzz&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.sktesabajang.co.cc/link-me&quot;&gt;Web World&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://welcomemynewblog.blogspot.com/&quot;&gt;Welcome My New Blog&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.wildtusker.blogspot.com/&quot;&gt;Wild Tusker&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://whenmymindtrytospeak.blogspot.com/&quot;&gt;When My Mind Try To Speak&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.yourlocalgallery.com/&quot;&gt;Your Local Gallery&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.zeethru.co.cc/&quot;&gt;Zeethru&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/7368906416704479287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=7368906416704479287&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/7368906416704479287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/7368906416704479287'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/links-exchange_24.html' title='LINKS EXCHANGE'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-2286452005857559817</id><published>2009-09-23T11:10:00.001+05:30</published><updated>2015-01-01T13:32:14.584+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ABOUT ME"/><title type='text'>ABOUT ME</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Simple minded learner. &lt;br /&gt;&lt;br /&gt;Contact emails:&lt;br /&gt;&lt;a href=&quot;mailto:chandrasekar_cse@yahoo.co.in&quot;&gt;chandrasekar_cse@yahoo.co.in&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;mailto:s.its.chandru@gmail.com&quot;&gt;s.its.chandru@gmail.com&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/2286452005857559817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=2286452005857559817&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2286452005857559817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2286452005857559817'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/about-me.html' title='ABOUT ME'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6958451524788954639</id><published>2009-09-23T10:38:00.000+05:30</published><updated>2009-09-23T10:39:27.324+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="BLOG&#39;s OBJECTIVE"/><title type='text'>BLOG&#39;s OBJECTIVE</title><content type='html'>The main Objective Of the Blog is to share everything that I want to share with my readers.The Blog is a repository Of Facts, Health, and most importantly it focuses on Java. Java is a technology which always has something new to offer, no matter how many websites are launched to share it. So, through this blog, I would like to share my Java Experience and supported aptly by Java Quizzes, this is a Repository Of Knowledge which Helps everyone in need in some way or other.</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6958451524788954639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6958451524788954639&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6958451524788954639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6958451524788954639'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/blogs-objective.html' title='BLOG&#39;s OBJECTIVE'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6842663086604660622</id><published>2009-09-22T09:13:00.003+05:30</published><updated>2009-09-22T09:56:04.612+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Quiz"/><title type='text'>Java Quiz -17</title><content type='html'>Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to post few more questions to test your capability. &lt;br /&gt;Dont worry guys, I will give you the answer too! Try to answer it yourself without referring to the answers to test yourself.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Q: 1 Given a valid DateFormat object named df, and&lt;br /&gt;1. Date data1 = new Date(0L);&lt;br /&gt;2. String data2 = &quot;September 22, 2009&quot;;&lt;br /&gt;3. // insert code here&lt;br /&gt;What updates data1&#39;s value with the date represented by data2?&lt;/span&gt;&lt;br /&gt;A. 3. data1 = df.parse(data2);&lt;br /&gt;B. 3. data1 = df.getDate(data2);&lt;br /&gt;C. 3. try {&lt;br /&gt;   4. data1 = df.parse(data2);&lt;br /&gt;   5. } catch(ParseException e) { };&lt;br /&gt;D. 3. try {&lt;br /&gt;   4. data1 = df.getDate(data2);&lt;br /&gt;   5. } catch(ParseException e) { };&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 2 Given:&lt;br /&gt;1. public class ClassA {&lt;br /&gt;2. private StringBuilder testStringBuilder = new StringBuuilder();&lt;br /&gt;3. public void logTest(String data1, String data2) {&lt;br /&gt;4. testStringBuilder.append(data1);&lt;br /&gt;5. testStringBuilder.append(data2);&lt;br /&gt;6. }&lt;br /&gt;7. }&lt;br /&gt;The programmer must guarantee that a single ClassA object works properly for a multi-threaded system. How must this code be changed to be thread-safe?&lt;/span&gt;&lt;br /&gt;A. Synchronize the logTest method&lt;br /&gt;B. No change is necessary, the current ClassA  code is already thread-safe.&lt;br /&gt;C. replace StringBuilder with just a String object and use the string concatenation (+=) within the logTest method&lt;br /&gt;D. replace StringBuilder with StringBuffer&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: A&lt;br /&gt;&lt;br /&gt;Q: 3 Given:&lt;br /&gt;1 . import java.io.*;&lt;br /&gt;2. public class ClassA implements Serializable {&lt;br /&gt;3. private ClassB tree = new ClassB();&lt;br /&gt;4. public static void main(String [] args) {&lt;br /&gt;5. ClassA classA = new ClassA();&lt;br /&gt;6. try {&lt;br /&gt;7. FileOutputStream fileOutputStream = new FileOutputStream(&quot;ClassA.ser&quot;);&lt;br /&gt;8. ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);&lt;br /&gt;9. objectOutputStream.writeObject(classA); &lt;br /&gt;10.objectOutputStream.close();&lt;br /&gt;11. } catch (Exception ex) { ex.printStackTrace(); }&lt;br /&gt;12. } }&lt;br /&gt;13.&lt;br /&gt;14. class ClassB { }&lt;br /&gt;What is the result?&lt;/span&gt;&lt;br /&gt;A. An exception is thrown at runtime.&lt;br /&gt;B. Compilation fails.&lt;br /&gt;C. An instance of ClassA is serialized.&lt;br /&gt;D. An instance of ClassA and an instance of ClassB are both serialized.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: A&lt;br /&gt;&lt;br /&gt;Q: 4 Assuming that the serializeClassC() and the deserializeClassC() methods&lt;br /&gt;will correctly use Java serialization and given:&lt;br /&gt;1. import java.io.*;&lt;br /&gt;2. class ClassA {ClassA() { System.out.print(&quot;1&quot;); } }&lt;br /&gt;3. class ClassB extends ClassA implements Serializable {&lt;br /&gt;4. ClassB() { System.out.print(&quot;2&quot;); } }&lt;br /&gt;5. public class ClassC extends ClassB { int size = 42;&lt;br /&gt;6. public static void main(String [] args) {&lt;br /&gt;7. ClassC b = new ClassC();&lt;br /&gt;8. b.serializeClassC(b); // assume correct serialization&lt;br /&gt;9. b = b.deserializeClassC(b); // assume correct&lt;br /&gt;10. System.out.println(&quot; restored &quot; + b.size + &quot; &quot;); }&lt;br /&gt;11. // more ClassC methods&lt;br /&gt;12. }&lt;br /&gt;What is the result?&lt;/span&gt;&lt;br /&gt;A. Compilation fails.&lt;br /&gt;B. 1 restored 42&lt;br /&gt;C. 12 restored 42&lt;br /&gt;D. 121 restored 42&lt;br /&gt;E. 1212 restored 42&lt;br /&gt;F. An exception is thrown at runtime.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: D&lt;br /&gt;&lt;br /&gt;Q: 5 Given this method in a class:&lt;br /&gt;1. public String toString() {&lt;br /&gt;2. StringBuffer testStringBuffer = new StringBuffer();&lt;br /&gt;3. testStringBuffer.append(&#39;&lt;&#39;);&lt;br /&gt;4. testStringBuffer.append(this.name);&lt;br /&gt;5. testStringBuffer.append(&#39;&gt;&#39;);&lt;br /&gt;6. return testStringBuffer.toString();&lt;br /&gt;7. }&lt;br /&gt;Which statement is true?&lt;/span&gt;&lt;br /&gt;A. This code will perform well and converting the code to use StringBuilder will not enhance the performance.&lt;br /&gt;B. This code will perform poorly. For better performance, the code should be rewritten:&lt;br /&gt;return &quot;&lt;&quot; + this.name + &quot;&gt;&quot;;&lt;br /&gt;C. The programmer can replace StringBuffer with StringBuilder with no other changes.&lt;br /&gt;D. This code is NOT thread-safe.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 6 Given:&lt;br /&gt;1. double data = 314159.26;&lt;br /&gt;2. NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN);&lt;br /&gt;3. String b;&lt;br /&gt;4. //insert code here&lt;br /&gt;Which code, inserted at line 4, sets the value of b to 314.159,26?&lt;/span&gt;&lt;br /&gt;A. b = nf.parse( data );&lt;br /&gt;B. b = nf.format( data );&lt;br /&gt;C. b = nf.equals( data );&lt;br /&gt;D. b = nf.parseObject( data );&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: B&lt;br /&gt;&lt;br /&gt;Q: 7 Given:&lt;br /&gt;System.out.format(&quot;Pi is approximately %d.&quot;, Math.PI);&lt;br /&gt;What is the result?&lt;/span&gt;&lt;br /&gt;A. Pi is approximately 3.141593.&lt;br /&gt;B. Pi is approximately 3.&lt;br /&gt;C. Compilation fails.&lt;br /&gt;D. An exception is thrown at runtime.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: D&lt;br /&gt;&lt;br /&gt;Q: 8 Given:&lt;br /&gt;1. public class ClassA implements Comparable&lt;ClassA&gt; {&lt;br /&gt;2. private int data1, data2;&lt;br /&gt;3. public ClassA(int data3, int data4) { data1 = data3; data2 = data4; }&lt;br /&gt;4. public int getTestdata1() { return data1; }&lt;br /&gt;5. public int getTestdata2() { return data2; }&lt;br /&gt;6. public String toString() {&lt;br /&gt;7. return &quot;&lt;&quot; + data1 + &quot;,&quot; + data2 + &quot;&gt;&quot;;&lt;br /&gt;8. }&lt;br /&gt;9. // insert code here&lt;br /&gt;10. }&lt;br /&gt;Which method will complete this class?&lt;/span&gt;&lt;br /&gt;A. public int compareTo(Object object1){/*more code here*/}&lt;br /&gt;B. public int compareTo(ClassA classA){/*more code here*/}&lt;br /&gt;C. public int compare(ClassA classA1,ClassA classA2){/*more code here*/}&lt;br /&gt;D. public int compare(Object object1,Object object2){/*more code here*/}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: B&lt;br /&gt;&lt;br /&gt;Q: 9 Given:&lt;br /&gt;1. public class ClassA {&lt;br /&gt;2. private String data1;&lt;br /&gt;3. public ClassA(String data1) {&lt;br /&gt;4. this.data1 = data1;&lt;br /&gt;5. }&lt;br /&gt;6. public boolean equals(Object o) {&lt;br /&gt;7. if ( ! o instanceof ClassA ) return false;&lt;br /&gt;8. ClassA p = (ClassA) o;&lt;br /&gt;9. return p.data1.equals(this.data1);&lt;br /&gt;10. }&lt;br /&gt;11. }&lt;br /&gt;Which statement is true?&lt;/span&gt;&lt;br /&gt;A. A HashSet could contain multiple ClassA objects with the same data1.&lt;br /&gt;B. Compilation fails because the hashCode method is not overridden.&lt;br /&gt;C. All ClassA objects will have the same hash code because the hashCode method is not overridden.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: A&lt;br /&gt;&lt;br /&gt;Q: 10 Given:&lt;br /&gt;13. public static void search(List&lt;String&gt; listObject) {&lt;br /&gt;14. listObject.clear();&lt;br /&gt;15. listObject.add(&quot;data2&quot;);&lt;br /&gt;16. listObject.add(&quot;data1&quot;);&lt;br /&gt;17. listObject.add(&quot;data3&quot;);&lt;br /&gt;18. System.out.println(Collections.binarySearch(listObject, &quot;data1&quot;));&lt;br /&gt;19. }&lt;br /&gt;What is the result of calling search with a valid List implementation?&lt;/span&gt;&lt;br /&gt;A. 0&lt;br /&gt;B. 1&lt;br /&gt;C. 2&lt;br /&gt;D. data1&lt;br /&gt;E. data2&lt;br /&gt;F. data3&lt;br /&gt;G. The result cannot be defined.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: G&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hope you found this useful! Kindly give me your comments regarding the same.Many more Quizzes are to be posted! Kindly make use of them as much as possible!</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6842663086604660622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6842663086604660622&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6842663086604660622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6842663086604660622'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/java-quiz-17.html' title='Java Quiz -17'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-5513745745719227366</id><published>2009-09-14T09:17:00.005+05:30</published><updated>2009-09-14T09:55:06.913+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Quiz"/><title type='text'>Java Quiz -16</title><content type='html'>Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to post few more questions to test your capability. &lt;br /&gt;Dont worry guys, I will give you the answer too! Try to answer it yourself without referring to the answers to test yourself.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Q: 1 Given a method that must ensure that its parameter is not null:&lt;br /&gt;1. public void test(Object data) {&lt;br /&gt;2. // check for null data&lt;br /&gt;...&lt;br /&gt;10. System.out.println(data.getClass());&lt;br /&gt;11. }&lt;br /&gt;What, inserted at line 2, is the appropriate way to handle a null data?&lt;/span&gt;&lt;br /&gt;A. assert data == null;&lt;br /&gt;B. assert data != null, &quot;data is null&quot;;&lt;br /&gt;C. if (data == null) {&lt;br /&gt;throw new AssertionException(&quot;data is null&quot;);&lt;br /&gt;}&lt;br /&gt;D. if (data == null) {&lt;br /&gt;throw new IllegalArgumentException(&quot;data is null&quot;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: D&lt;br /&gt;&lt;br /&gt;Q: 2 Given:&lt;br /&gt;1. package javaQuiz;&lt;br /&gt;2. public class ClassA {&lt;br /&gt;3. public InnerClassB classb = new InnerClassB();&lt;br /&gt;4. class InnerClassB {&lt;br /&gt;5. public int data1;&lt;br /&gt;6. public int data2;&lt;br /&gt;7. }&lt;br /&gt;8. }&lt;br /&gt;Which statement is true about the class of an object that can reference the variable data1?&lt;/span&gt;&lt;br /&gt;A. classb can be any class.&lt;br /&gt;B. No class has access to data1.&lt;br /&gt;C. The class must belong to the javaQuiz package.&lt;br /&gt;D. The class must be a subclass of the class ClassA.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 3 Which four statements are true? (Choose four.)&lt;/span&gt;&lt;br /&gt;A. Has-a relationships can be implemented using instance variables.&lt;br /&gt;B. Is-a relationships can be implemented using the extends keyword.&lt;br /&gt;C. Has-a relationships should never be encapsulated.&lt;br /&gt;D. An array or a collection can be used to implement a one-to-many has-a relationship.&lt;br /&gt;E. The relationship between Movie and Actress is an example of an is-a relationship.&lt;br /&gt;F.  Is-a relationships can be implemented using the implements keyword.&lt;br /&gt;G. Has-a relationships should be implemented using inheritance.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: A, B, D, F&lt;br /&gt;&lt;br /&gt;Q: 4 Given:&lt;br /&gt;0. public class ClassA {&lt;br /&gt;1.&lt;br /&gt;2. private String data1;&lt;br /&gt;3. private Integer data2;&lt;br /&gt;4. public String data3;&lt;br /&gt;5.&lt;br /&gt;6. public void test(String data1,&lt;br /&gt;7. String data3,&lt;br /&gt;8. Integer data2) {&lt;br /&gt;9. this.data1 = data1;&lt;br /&gt;10. this.data3 = data3;&lt;br /&gt;11. this.data2 = data2;&lt;br /&gt;12. }&lt;br /&gt;13. }&lt;br /&gt;Which statement is true?&lt;/span&gt;&lt;br /&gt;A. The code demonstrates polymorphism.&lt;br /&gt;B. The class is fully encapsulated.&lt;br /&gt;C. The data3 variable breaks encapsulation.&lt;br /&gt;D. The data1 and data2 variables break polymorphism.&lt;br /&gt;E. The test method breaks encapsulation.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 5 Given:&lt;br /&gt;0. abstract class ClassA {&lt;br /&gt;1. abstract void test1();&lt;br /&gt;2. void test2() { }&lt;br /&gt;3. }&lt;br /&gt;4. class ClassB extends ClassA {&lt;br /&gt;5. void test1() { }&lt;br /&gt;6. void test2() { }&lt;br /&gt;7. }&lt;br /&gt;8. class ClassC extends ClassB { void test3() { } }&lt;br /&gt;and:&lt;br /&gt;ClassA classA = new ClassB(); &lt;br /&gt;ClassC classB = new ClassC(); &lt;br /&gt;ClassA classC = new ClassC();&lt;br /&gt;What are four valid examples of polymorphic method calls? (Choose four.)&lt;/span&gt;&lt;br /&gt;A. classA.test2();&lt;br /&gt;B. classC.test2();&lt;br /&gt;C. classC.test3();&lt;br /&gt;D. classC.test1();&lt;br /&gt;E. classB.test3();&lt;br /&gt;F. classA.test1();&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: A, B, D, F&lt;br /&gt;&lt;br /&gt;Q: 6 Given:&lt;br /&gt;1. interface ClassA { public void test(); }&lt;br /&gt;...&lt;br /&gt;10. class ClassB {}&lt;br /&gt;...&lt;br /&gt;20. class ClassC extends ClassB {&lt;br /&gt;21. ClassD classD;&lt;br /&gt;22. }&lt;br /&gt;...&lt;br /&gt;30. class ClassE extends ClassC implements ClassA{&lt;br /&gt;31. public void test() {} &lt;br /&gt;32. }&lt;br /&gt;...&lt;br /&gt;40. class ClassF implements ClassA{&lt;br /&gt;41. public void test() {}&lt;br /&gt;42. }&lt;br /&gt;Which three are true? (Choose three.)&lt;/span&gt;&lt;br /&gt;A. ClassF is-a ClassB&lt;br /&gt;B. ClassF is-a ClassA&lt;br /&gt;C. ClassC is-a ClassB&lt;br /&gt;D. ClassC is-a ClassA&lt;br /&gt;E. ClassF has-a ClassB&lt;br /&gt;F. ClassE has-a ClassD&lt;br /&gt;G. ClassE has-a ClassA&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: B, C, F&lt;br /&gt;&lt;br /&gt;Q: 7 Given:&lt;br /&gt;1. public class ClassA {&lt;br /&gt;2. protected int test(int data) { return 0; }&lt;br /&gt;3. }&lt;br /&gt;4. class ClassB extends ClassA {&lt;br /&gt;5. // insert code here&lt;br /&gt;6. }&lt;br /&gt;Which five methods, inserted independently at line 5, will compile? (Choose five.)&lt;/span&gt;&lt;br /&gt;A. public int test(int data1) { return 0; }&lt;br /&gt;B. private int test(int data1) { return 0; }&lt;br /&gt;C. private int test(long data1) { return 0; }&lt;br /&gt;D. protected long test(int data1) { return 0; }&lt;br /&gt;E. protected int test(long data1) { return 0; }&lt;br /&gt;F. protected long test(long data1) { return 0; }&lt;br /&gt;G. protected long test(int data1, int data2) { return 0; }&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: A, C, E, F, G&lt;br /&gt;&lt;br /&gt;Q: 8 Given:&lt;br /&gt;1. public class ClassA {&lt;br /&gt;2. protected static int test(int data1, int data2) { return data1 * data2;}&lt;br /&gt;3. }&lt;br /&gt;and:&lt;br /&gt;10. public class ClassB extends ClassA{&lt;br /&gt;11. public static int test(int data1, int data2) {&lt;br /&gt;12. int data3 = super.test(data1, data2);&lt;br /&gt;13. return data3;&lt;br /&gt;14. }&lt;br /&gt;15. }&lt;br /&gt;and:&lt;br /&gt;20. ClassB classB = new ClassB ();&lt;br /&gt;21. System.out.println(classB.test(3,4));&lt;br /&gt;22. System.out.println(ClassB.test(2,2));&lt;br /&gt;What is the result?&lt;/span&gt;&lt;br /&gt;A. 12&lt;br /&gt;4&lt;br /&gt;B. The code runs with no output.&lt;br /&gt;C. An exception is thrown at runtime.&lt;br /&gt;D. Compilation fails because of an error in line 11.&lt;br /&gt;E. Compilation fails because of an error in line 12.&lt;br /&gt;F. Compilation fails because of an error in line 21.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: E&lt;br /&gt;&lt;br /&gt;Q: 9 Given:&lt;br /&gt;1. class ClassA {&lt;br /&gt;2. java.util.ArrayList data1;&lt;br /&gt;3. public final void testData(String data2) {&lt;br /&gt;4. data1.add(data2);&lt;br /&gt;5. }&lt;br /&gt;6. }&lt;br /&gt;7. public class ClassB extends ClassA {&lt;br /&gt;8. public void testData(String data2) {&lt;br /&gt;9. System.out.println(&quot;Cannot add Data1&quot;);&lt;br /&gt;10. }&lt;br /&gt;11. public static void main(String[] args) {&lt;br /&gt;12. ClassA classA = new ClassB();&lt;br /&gt;13. classA.testData(&quot;Data2&quot;);&lt;br /&gt;14. }&lt;br /&gt;15. }&lt;br /&gt;What is the result?&lt;/span&gt;&lt;br /&gt;A. The code runs with no output.&lt;br /&gt;B. A NullPointerException is thrown in Line 4.&lt;br /&gt;C. Compilation fails.&lt;br /&gt;D. Cannot add Data1&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 10 Which three statements are true? (Choose three.)&lt;/span&gt;&lt;br /&gt;A. A final method in class ClassA can be abstract if and only if ClassA is abstract.&lt;br /&gt;B. A protected method in class ClassA can be overridden by any subclass of ClassA.&lt;br /&gt;C. A private static method can be called only within other static methods in class ClassA.&lt;br /&gt;D. A non-static public final method in class ClassA can be overridden in any subclass of ClassA.&lt;br /&gt;E. A public static method in class ClassA can be called by a subclass of ClassA without explicitly referencing the class ClassA.&lt;br /&gt;F. A method with the same signature as a private final method in class ClassA can be implemented in a subclass of ClassA.&lt;br /&gt;G. A protected method in class ClassA can be overridden by a subclass only if the subclass is in the same package as ClassA.&lt;br /&gt;&lt;br /&gt;Answer: B, E, F&lt;br /&gt;&lt;br /&gt;Hope you found this useful! Kindly give me your comments regarding the same.Many more Quizzes are yet to be posted! Kindly make use of them as much as possible!</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/5513745745719227366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=5513745745719227366&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/5513745745719227366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/5513745745719227366'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/java-quiz-16.html' title='Java Quiz -16'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-8303486550823421476</id><published>2009-09-11T09:12:00.003+05:30</published><updated>2009-09-11T09:19:06.400+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Testing and Concepts</title><content type='html'>Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to present few points related to Testing and some new Concepts related to Java.I assure you that it will be very informative for the readers.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round : Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.What is Black Box testing and white box testing?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style=&quot;font-weight:bold;&quot;&gt;Black Box Testing:&lt;/span&gt;&lt;br /&gt;   Also known as functional testing. A software testing technique whereby the internal workings of the item being tested are not known by the tester.&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;font-weight:bold;&quot;&gt;White Box Testing:&lt;/span&gt;&lt;br /&gt;            Also known as glass box, structural, clear box and open box testing. A software testing technique whereby explicit knowledge of the internal workings of the item being tested are used to select the test data. Unlike black box testing, white box testing uses specific knowledge of programming code to examine outputs.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.What is the name of the testing supposed to be written by the developers?&lt;/span&gt;&lt;br /&gt;  White Box Testing.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.Give the name of 2 performance of testing tools?&lt;/span&gt;&lt;br /&gt;  Apache Jmeter,curl loader.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.Give the name of 2 automated testing tools?&lt;/span&gt;&lt;br /&gt;  QTP and Winrunner,Rational Robot.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.Difference between stress testing and load testing?&lt;/span&gt;&lt;br /&gt;  Stress Testing : To test how the application is responding while we enter maximum length of strings into the application.&lt;br /&gt;  Load Testing : To test the application respond(response time) by increasing the number of users.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round:Concepts&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.Namespace&lt;/span&gt;&lt;br /&gt; As a rule, names in a namespace cannot have more than one meaning, that is, two or more things cannot share the same name.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.Lazy loading&lt;/span&gt;&lt;br /&gt;        Lazy loading, also known as dynamic function loading , is a mode that allows a developer to specify what components of a program should not be loaded into storage by default when a program is started. Ordinarily, the system loader automatically loads the initial program and all of its dependent components at the same time. In lazy loading, dependents are only loaded as they are specifically requested. Lazy loading can be used to improve the performance of a program if most of the dependent components are never actually used.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.Two Phase Commit&lt;/span&gt;&lt;br /&gt; The two-phase commit strategy is designed to ensure that either all the databases are updated or none of them, so that the databases remain synchronized.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.Server affinity&lt;/span&gt;&lt;br /&gt; Server affinity refers to the characteristics of each load distribution facility that take these constraints into account. The load distribution facility recognizes that multiple servers can be acceptable targets for a request. However, it also recognizes that each request can be directed to a particular server where it is handled better or faster. &lt;br /&gt;&lt;br /&gt;Server affinity can be weak or strong. &lt;br /&gt;&lt;br /&gt; In weak server affinity, the system attempts to enforce the desired affinity for the majority of requests, but does not always guarantee that this affinity will be respected. &lt;br /&gt; In strong server affinity, the system guarantees that affinity is always respected and generates an error when it cannot direct a request to the appropriate server. &lt;br /&gt;   &lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.Soft Deletion.&lt;/span&gt;&lt;br /&gt; There also has to be a special handling of the delete operation. Not every client has enough space for every database item. Sometimes we want to remove an item from just one client, but not from the others.&lt;br /&gt; Introduce a flag to an existing table which indicates that a row has been deleted (this is called a soft/logical delete) instead of actually deleting the row (a hard delete).&lt;br /&gt;&lt;br /&gt;Hope this topic was useful to you, Please Post your comments!</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/8303486550823421476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=8303486550823421476&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8303486550823421476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8303486550823421476'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/testing-and-concepts.html' title='Testing and Concepts'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-8983091649758653309</id><published>2009-09-10T09:33:00.006+05:30</published><updated>2009-09-10T09:40:54.058+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>About Product,Companies and Databases</title><content type='html'>Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to present few points related to Product,Companies and Databases which would be helpful for the readers.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round:About Product and Companies&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1.How is the company that tells the “System applications and products for data processing”better known as?&lt;br /&gt;  &lt;span style=&quot;font-weight:bold;&quot;&gt;SAP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.Five colleagues working for patni computers ,resigned their job and started a company with an investment of 10000.Today this company is a house hold name. Which company we are talking about?&lt;br /&gt;  &lt;span style=&quot;font-weight:bold;&quot;&gt;Infosys&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3.Mark Shuttleworth is a South African entrepreneur who was the second self funded space tourist. Which software product is he responsible for?&lt;br /&gt;&lt;br /&gt;  &lt;span style=&quot;font-weight:bold;&quot;&gt;Ubuntu&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4.Which product is advertised “Hello coming in june”.This product is now a rage and set the benchmark in its category.&lt;br /&gt;  &lt;span style=&quot;font-weight:bold;&quot;&gt;Ipod&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5.Microsoft is accused by Apple to have copies of Apple&#39;s windows or gui concept. From which company/organization did Apple copy it from?&lt;br /&gt;  &lt;span style=&quot;font-weight:bold;&quot;&gt;Xerox&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round:Databases&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.What is surrogate key?&lt;/span&gt;&lt;br /&gt; A surrogate key in a  is a unique identifier for either an entity in the modeled world or an object in the database. The surrogate key is not derived from application data.&lt;br /&gt;A surrogate should have the following&lt;br /&gt;the value is unique system-wide, hence never reused; &lt;br /&gt;the value is system generated; &lt;br /&gt;the value is not manipulable by the user or application; &lt;br /&gt;the value contains no semantic meaning; &lt;br /&gt;the value is not visible to the user or application; &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.What is the difference between union and unionall?&lt;/span&gt;&lt;br /&gt;  Union will filter duplicate values but union all will not filter duplicate values.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.Every non-key attribute if fully functionally dependent on primary key.Which normal form it is?&lt;/span&gt;&lt;br /&gt;  2nd Normal form.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.What is the difference between primary key and unique key?&lt;/span&gt;&lt;br /&gt;The column holding the primary key constraint cannot accept  null values.whereas column holding the unique constraint can accept null values .&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.What is the difference between DELETE TABLE and TRUNCATE TABLE?&lt;/span&gt;&lt;br /&gt; TRUNCATE is a DDL command and cannot be rolled back. All of the memory space is released back to the server. &lt;br /&gt;DELETE is a DML command and can be rolled back.&lt;br /&gt;&lt;br /&gt;Hope this topic was useful to you, Please Post your comments!</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/8983091649758653309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=8983091649758653309&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8983091649758653309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8983091649758653309'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/about-productcompanies-and-databases.html' title='About Product,Companies and Databases'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6605141507691205212</id><published>2009-09-09T12:15:00.005+05:30</published><updated>2009-09-09T12:19:35.125+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>People and Java code debugging</title><content type='html'>Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to present few concepts in People related to Open Source and Java code debugging which would be helpful for the readers. &lt;br /&gt;&lt;br /&gt;Without wasting further time, Here We Go!&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round :People&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.Who created Java?&lt;/span&gt;&lt;br /&gt;	James Gosling(born May 19, 1955 near Calgary, Alberta, Canada).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.Who invented C++?&lt;/span&gt;&lt;br /&gt;	Bjarne Stroutstrup.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.Who is the well known founder of Oracle?&lt;/span&gt;&lt;br /&gt;	Lawrence Joseph Larry Ellison.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.Who is the well known founder of Apple?&lt;/span&gt;&lt;br /&gt;	Steven Paul Jobs.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.He is from Moolaipozhi village near Tirunelvelli.Went on to start an IT company which is among top ten Indian IT services firms.&lt;br /&gt;Who is this man and which company he create?&lt;/span&gt;&lt;br /&gt;	Shiv Nadar - HCL&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round : Java code debugging&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1.public class Test {&lt;br /&gt;	public static void main(String[] args) throws Exception{&lt;br /&gt;		BigInteger fiveThousand = new BigInteger(&quot;5000&quot;);&lt;br /&gt;		BigInteger fiftyThousand = new BigInteger(&quot;50000&quot;);&lt;br /&gt;		BigInteger fiveHundredThousand = new BigInteger(&quot;500000&quot;);&lt;br /&gt;		BigInteger Total =BigInteger.ZERO;&lt;br /&gt;		System.out.println(Total);&lt;br /&gt;		Total.add(fiveThousand);&lt;br /&gt;		Total.add(fiftyThousand);&lt;br /&gt;		Total.add(fiveHundredThousand);&lt;br /&gt;		System.out.println(Total);&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;	&lt;span style=&quot;font-weight:bold;&quot;&gt;Output:0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.package com.planetsoft;&lt;br /&gt;public class Me{&lt;br /&gt;public static void main(String[] args){&lt;br /&gt;System.out.println(Me.class.getName().replaceAll(“.”,”\”)+”.class”);&lt;br /&gt;}&lt;br /&gt;	&lt;span style=&quot;font-weight:bold;&quot;&gt;output://///////////////.class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3..public boolean isOdd(int i){&lt;br /&gt;	return i%2==1;&lt;br /&gt;}&lt;br /&gt;	&lt;span style=&quot;font-weight:bold;&quot;&gt;Output: if we give odd numbers with negative it will return false . For eg: Lets take the value of i=-3 , after computing i%2 the value will be -1 and it will check -1==1 ,hence both not equals it will return false.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4..Write a one line method that takes a list and returns a list , eliminating duplicates and preserving the order of the original list?&lt;br /&gt;		&lt;span style=&quot;font-weight:bold;&quot;&gt;Let duplicatedList be a Array list variable with duplicate values.whereas&lt;br /&gt;		LinkedHashSet&lt;Integer&gt; list = new inkedHashSet&lt;Integer&gt;(duplicatedList);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5. Write a one line method that takes comma a demilited strings and return a string[],each comma may be followed by zero or more spaces which must be ignored by the method.&lt;br /&gt;                             &lt;span style=&quot;font-weight:bold;&quot;&gt;It can be achieved using the regular expression.Here is the example using String,Similar way we can do that for string array.&lt;br /&gt;		String s = &quot;, There , , a , is a ,        , ,  null , object ,&quot;;&lt;br /&gt;		s=s.replaceAll(&quot;%*, *&quot;,&quot;&quot; );&lt;br /&gt;		System.out.println(s); &lt;/span&gt;             &lt;br /&gt;&lt;br /&gt;                                                                      &lt;br /&gt;1.public class TestList {&lt;br /&gt;	public static void main(String[] args) throws Exception{&lt;br /&gt;		final long micros_perDay = 24*60*60*1000*1000;&lt;br /&gt;		final long macros_perDay = 24*60*60*1000;&lt;br /&gt;		System.out.println(micros_perDay/macros_perDay);&lt;br /&gt;	}&lt;br /&gt;}	&lt;span style=&quot;font-weight:bold;&quot;&gt;output:5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.public class AnimalFarm {&lt;br /&gt;		public static void main(String[] args) throws IOException{&lt;br /&gt;		final String pig = &quot;length: 10&quot;;&lt;br /&gt;		final String pig1 = &quot;length :&quot;+pig.length();&lt;br /&gt;		System.out.println(&quot;animals are equal&quot;+pig==pig1);&lt;br /&gt;			&lt;br /&gt;	} &lt;br /&gt;  }  &lt;br /&gt;	&lt;span style=&quot;font-weight:bold;&quot;&gt;output:false&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3.public class SetMagic {&lt;br /&gt;	public static void main(String[] args) throws IOException{&lt;br /&gt;		int[] vals = {10,012,14,016};&lt;br /&gt;		Set&lt;Integer&gt; magic = new HashSet&lt;Integer&gt;();&lt;br /&gt;		for(int i=0;i&lt;vals.length;i++){&lt;br /&gt;			magic.add(vals[i]);&lt;br /&gt;		}System.out.println(magic.size());&lt;br /&gt;	} &lt;br /&gt;    }  		&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;output:2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4.public class Increment {&lt;br /&gt;	public static void main(String[] args){&lt;br /&gt;	int j=0;&lt;br /&gt;	for(int i=0;i&lt;100;i++){&lt;br /&gt;	j=j++;&lt;br /&gt;	}&lt;br /&gt;	System.out.println(j);&lt;br /&gt;	} &lt;br /&gt;}  &lt;br /&gt;	&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;output:0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5.Provide a definition for i so that the loop turns into a infinite loop.&lt;br /&gt;while(i!=i){&lt;br /&gt;system.out.println(“please stop”);&lt;br /&gt;}&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;output: we can declare i&lt;br /&gt;          double i=Double.Nan;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Hope this topic was useful to you, Please Post your comments!</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6605141507691205212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6605141507691205212&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6605141507691205212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6605141507691205212'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/people-and-java-code-debugging.html' title='People and Java code debugging'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-2996480464319088996</id><published>2009-09-07T08:55:00.009+05:30</published><updated>2009-09-07T09:13:13.865+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Quiz"/><title type='text'>Java Quiz -15</title><content type='html'>Hi friends,&lt;br /&gt;&lt;br /&gt;Today I would like to present few concepts in Open Source and Java API&#39;s in today&#39;s Quiz which would be helpful for the readers.&lt;br /&gt;&lt;br /&gt;Without wasting further time, Here We Go!&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round : Open Source Round&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.Who started the open source movement?&lt;/span&gt;&lt;br /&gt;	Richard Stallman&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.What does”free as freedom, free as in beer” means in the context of Open Source?&lt;/span&gt;&lt;br /&gt;	“free as freedom” phrase describes that the users can modify the functionality of the open source.&lt;br /&gt;	“free as in beer” phrase describes that the users can get the liscence free of cost.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.Give the name three Open Source softwares?&lt;/span&gt;&lt;br /&gt;	UNIX,LINUX,Perl&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;4.Give the name of three open source databases?&lt;/span&gt;&lt;br /&gt;	Hsql,MySql,PostgreSQL&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;5.What is the name of open source webserver which is most widely used webserver in the world?&lt;/span&gt;&lt;br /&gt;	Apache,Jakarta Tomcat,Tornado&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Round : Java API&#39;s Round&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1.   How do you achieve custom serialization?&lt;/span&gt;&lt;br /&gt;	We can achieve this by overriding the writeObject() and readObject() methods in ObjectOutputStream and ObjectInputStream.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2.  I have an int column in the database that is null.&lt;br /&gt;I do a rs.getInt() on that column and get a 0.&lt;br /&gt;How do u find out whether the column has a value of 0 or its null?&lt;/span&gt;&lt;br /&gt;Using the rs.wasNull() will return a boolean.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;3.I have a list of String objects.&lt;br /&gt;I want to create string array from the list not an object array.&lt;br /&gt;How do u achieve this?&lt;/span&gt;&lt;br /&gt;ArrayList&lt;string&gt; a1 = new ArrayList&lt;string&gt;();&lt;br /&gt;a1.add(&quot;1&quot;);&lt;br /&gt;a1.add(&quot;2&quot;);&lt;br /&gt;a1.add(&quot;3&quot;);&lt;br /&gt;String st1[] = new String[a.size()];&lt;br /&gt;for(int i=0; i&lt;a1a1.size();i++){&lt;br /&gt;      st1[i]=a1.get(i);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Hope you found this useful! Kindly give me your comments regarding the same.Many more Quizzes are yet to be posted! Kindly make use of them as much as possible! </content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/2996480464319088996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=2996480464319088996&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2996480464319088996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2996480464319088996'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/java-quiz-15.html' title='Java Quiz -15'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-8362367782127127760</id><published>2009-09-04T16:13:00.003+05:30</published><updated>2009-09-04T16:17:02.370+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Quiz"/><title type='text'>Round :Basic Computer Science</title><content type='html'>&lt;p&gt;Hi friends,&lt;br /&gt;&lt;br /&gt;Its been sometime since we shared some information regarding the concepts(For those who missed out, We had been doing Few Java Quizzes! Check It out Here &lt;br /&gt;http://helptotheneeded.blogspot.com/search/label/Java%20Quiz)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Today I would like to present few concepts in basic Computer Science which would be helpful for the readers&lt;br /&gt;&lt;br /&gt;Without wasting further time, Here We Go!&lt;br /&gt;&lt;/p&gt;&lt;strong&gt;1.Give names of two sorting algorithms&lt;/strong&gt;&lt;br /&gt; 	Bubble sort,Insertion sort,Shell sort,Merge sort,Heap sort,Quick sort,Radix sort,Bucket sort,Distribution sort,Shuffle sort.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2.What is the name of the style of programming where the function calls itself?&lt;/strong&gt;&lt;br /&gt; 	Recursion&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3.Name any two searching algorithms&lt;/strong&gt;&lt;br /&gt; 	Breadth-First search,Depth limited search,Kruskal&#39;s algorithms,Prim&#39;s algorithms,Grover&#39;s algorithms,Dijikistra&#39;s algorithms.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4.What is Pointer?&lt;/strong&gt;&lt;br /&gt; 	A pointer is a variable which contains the address in memory of another variable.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5.Give two names of typical data structure:&lt;/strong&gt;&lt;br /&gt; 	Stack,Queue,Linked list,Doubly Linked List.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6.What is priority queue?&lt;/strong&gt;&lt;br /&gt; 	An element&#39;s priority is the time that element was  inserted.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7.What is a binary tree?&lt;/strong&gt;&lt;br /&gt; 	A binary tree is a  in which each node has at most two .&lt;br /&gt; 	-The left  of a node contains only nodes with keys less than the node&#39;s key. -The right subtree of a node contains only nodes with keys greater than node&#39;s key.Both the left and right subtrees must also be binary search trees. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8.What is a self Referential structure?&lt;/strong&gt;&lt;br /&gt; 	It is a important characteristic of the data structures used to implement lists , is that they contain, as a member, a reference variable of the same type as the class itself. For this reason, these data structures are frequently called self-referential or recursive data structures .&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;9.What is/are difference(s) between tree and graph?&lt;/strong&gt;&lt;br /&gt; 	-Tree has no loop but graph has loops. &lt;br /&gt; 	-Tree always has direction but graph do not have direction.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;10.What is the complexity of the Big O notation in the following pseudo code:&lt;/strong&gt;&lt;br /&gt; n=100;&lt;br /&gt; for(i=O;i&lt;n;i++){&lt;br /&gt; 	do something;&lt;br /&gt; }&lt;br /&gt; 	The complexity of the Big O notation is o(n)..&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/8362367782127127760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=8362367782127127760&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8362367782127127760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/8362367782127127760'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/round-basic-computer-science.html' title='Round :Basic Computer Science'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6901226036822701543</id><published>2009-09-03T18:05:00.002+05:30</published><updated>2009-09-03T18:12:44.352+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Java Acronyms</title><content type='html'>&lt;p&gt;Hi friends,&lt;br /&gt;&lt;br /&gt;Its been sometime since we shared some information regarding the concepts(For those who missed out, We had been doing Few Java Quizzes! Check It out Here &lt;br /&gt;&lt;strong&gt;http://helptotheneeded.blogspot.com/search/label/Java%20Quiz)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Today I would like to present few acronyms which would be helpful for the readers&lt;br /&gt;&lt;br /&gt;Without wasting further time, Here We Go!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Round :Acronyms&lt;/strong&gt; &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;1.&lt;strong&gt;BPM&lt;/strong&gt; – Business Process Management&lt;br /&gt;-a field of management focused on aligning organizations with the wants and needs of clients.&lt;br /&gt;&lt;br /&gt;2.&lt;strong&gt;JAXB&lt;/strong&gt;- Java Architecture for XML Binding&lt;br /&gt;-XML and Java technology are recognized as ideal building blocks for developing Web services and applications that access Web services. A new Java API called Java Architecture for XML Binding (JAXB) can make it easier to access XML documents from applications written in the Java programming language.&lt;br /&gt;&lt;br /&gt;3.&lt;strong&gt;SOA&lt;/strong&gt;-Service Oriented Architecture&lt;br /&gt;-a computer systems architectural style for creating and  using business processes,    packaged as services&lt;br /&gt;&lt;br /&gt;4.&lt;strong&gt;ORM&lt;/strong&gt;-Object Relational Mapping&lt;br /&gt;     -a software-programming issue in linking object-oriented  code with relational        databases .&lt;br /&gt;&lt;br /&gt;5.&lt;strong&gt;XP&lt;/strong&gt; – Extreme Programming&lt;br /&gt;    -is a software engineering methodology which is intended to     &lt;br /&gt;    improve software quality and responsiveness to changing &lt;br /&gt;    customer requirements.&lt;br /&gt;&lt;br /&gt;6.&lt;strong&gt;3NF&lt;/strong&gt;-Third Normal Form&lt;br /&gt;  -In order to be in a third normal form,a relation must fulfill     &lt;br /&gt;  the requirements to be in second normal form .Additionally all     &lt;br /&gt;  attributes that are not dependent upon the primary key must be       &lt;br /&gt;  eliminated.&lt;br /&gt;&lt;br /&gt;7.&lt;strong&gt;MD5&lt;/strong&gt; – Message Digest Algorithm 5.&lt;br /&gt;-In cryptography, MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function with a 128-bit hash value.&lt;br /&gt;&lt;br /&gt;8.&lt;strong&gt;XSLT&lt;/strong&gt; – Extensible Stylesheet Language Transformation.&lt;br /&gt;   - a style sheet language for XML documents.&lt;br /&gt;&lt;br /&gt;9.&lt;strong&gt;SAAS&lt;/strong&gt; – Software As a Service.&lt;br /&gt;-The sharing of end-user licenses and on-demand use may also reduce investment in server hardware or the shift of server use to SaaS suppliers of applications file services.&lt;br /&gt;&lt;br /&gt;10.&lt;strong&gt;AOP&lt;/strong&gt; – Aspect Oriented Programming&lt;br /&gt;&lt;p&gt;is a programming paradigm that increases modularity by allowing the separation of cross-cutting concerns, forming a basis for aspect-oriented software development.&lt;/p&gt;&lt;p&gt;Hope this topic was useful to you, Please Post your comments!&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6901226036822701543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6901226036822701543&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6901226036822701543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6901226036822701543'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/java-acronyms.html' title='Java Acronyms'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-2809951237371667745</id><published>2009-09-02T09:00:00.003+05:30</published><updated>2009-09-02T09:04:22.340+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Quiz"/><title type='text'>Java Quiz -14</title><content type='html'>&lt;p&gt;Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to post few more questions to test your capability. &lt;br /&gt;Dont worry guys, I will give you the answer too! Try to answer it yourself without referring to the answers to test yourself.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 1 Given:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;1. public class ClassA {&lt;br /&gt;2. private int data1;&lt;br /&gt;3. public void test1() {&lt;br /&gt;4. int tips = data1;&lt;br /&gt;5. data1 = tips + 1;&lt;br /&gt;6. }&lt;br /&gt;7. public void test2() {&lt;br /&gt;8. for(int data2 = 0; data2 &lt; 5; data2++) {&lt;br /&gt;9. new Thread() {&lt;br /&gt;10. public void test2() {&lt;br /&gt;11. test1();&lt;br /&gt;12. System.out.print(data1 + &quot;, &quot;);&lt;br /&gt;13. } }.start();&lt;br /&gt;14. } }&lt;br /&gt;Which two changes, taken together, would guarantee the output: 1, 2, 3, 4, 5, ?&lt;/strong&gt;&lt;br /&gt;A. move the line 12 print statement into the test1() method&lt;br /&gt;B. change line 7 to public synchronized void test2() {&lt;br /&gt;C. change the variable declaration on line 2 to private volatile int data1;&lt;br /&gt;D. wrap the code inside the test1() method with a synchronized( this ) block&lt;br /&gt;E. wrap the for loop code inside the test2() method with a synchronized block synchronized(this) { // for loop&lt;br /&gt;code here }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: A, D&lt;br /&gt;&lt;br /&gt;Q: 2 Given:&lt;br /&gt;classA1 and classA2 are public references available to many other threads. classA1 refers to a Thread and classA2 is an&lt;br /&gt;Object. The thread classA1 is currently executing classA2.wait().&lt;br /&gt;From another thread, what provides the most reliable way to ensure that classA1 will stop executing wait()?&lt;/strong&gt;&lt;br /&gt;A. classA1.notifyAll();&lt;br /&gt;B. classA1.notify();&lt;br /&gt;C. classA2.notify();&lt;br /&gt;D. Object.notify();&lt;br /&gt;E. Thread.notify();&lt;br /&gt;F. classA2.notifyAll();&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: F&lt;br /&gt;&lt;br /&gt;Q: 3 Given:&lt;br /&gt;1. static void test() throws RuntimeException {&lt;br /&gt;2. try {&lt;br /&gt;3. System.out.print(&quot;test &quot;);&lt;br /&gt;4. throw new RuntimeException();&lt;br /&gt;5. }&lt;br /&gt;6. catch (Exception ex) { System.out.print(&quot;exception1 &quot;); }&lt;br /&gt;7. }&lt;br /&gt;8. public static void main(String[] args) {&lt;br /&gt;9. try { test(); }&lt;br /&gt;10. catch (RuntimeException ex) { System.out.print(&quot;exception2 &quot;); }&lt;br /&gt;11. System.out.print(&quot;data &quot;);&lt;br /&gt;12. }&lt;br /&gt;What is the result?&lt;/strong&gt;&lt;br /&gt;A. test data&lt;br /&gt;B. A Throwable is thrown by main at exception2.&lt;br /&gt;C. test exception2 data&lt;br /&gt;D. test exception data&lt;br /&gt;E. Compilation fails.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: D&lt;br /&gt;&lt;br /&gt;Q: 4 Given:&lt;br /&gt;1. Float pi = new Float(10.14f);&lt;br /&gt;2. if (pi &gt; 10) {&lt;br /&gt;3. System.out.print(&quot;pi is bigger than 10. &quot;);&lt;br /&gt;4. }&lt;br /&gt;5. else {&lt;br /&gt;6. System.out.print(&quot;pi is not bigger than 10. &quot;);&lt;br /&gt;7. }&lt;br /&gt;8. finally {&lt;br /&gt;9. System.out.println(&quot;Answer it yourself.&quot;);&lt;br /&gt;10. }&lt;br /&gt;What is the result?&lt;/strong&gt;&lt;br /&gt;A. An exception occurs at runtime.&lt;br /&gt;B. pi is bigger than 10.&lt;br /&gt;C. Compilation fails.&lt;br /&gt;D. pi is bigger than 10. Answer it yourself.&lt;br /&gt;E. pi is not bigger than 10. Answer it yourself.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 5 Given:&lt;br /&gt;1. public static Iterator test(List listdata) {&lt;br /&gt;2. Collections.test(listdata);&lt;br /&gt;3. return listdata.iterator();&lt;br /&gt;4. }&lt;br /&gt;5. public static void main(String[] args) {&lt;br /&gt;6. List listdata = new ArrayList();&lt;br /&gt;7. listdata.add(&quot;1&quot;); listdata.add(&quot;2&quot;); listdata.add(&quot;3&quot;);&lt;br /&gt;8. for (Object objdata: test(listdata))&lt;br /&gt;9. System.out.print(objdata + &quot;, &quot;);&lt;br /&gt;10. }&lt;br /&gt;What is the result?&lt;/strong&gt;&lt;br /&gt;A. Compilation fails.&lt;br /&gt;B. 1, 2, 3,&lt;br /&gt;C. 3, 2, 1,&lt;br /&gt;D. The code runs with no output.&lt;br /&gt;E. An exception is thrown at runtime.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: A&lt;br /&gt;&lt;br /&gt;Q: 6 Given:&lt;br /&gt;1. class ClassA {&lt;br /&gt;2. public void process() { System.out.print(&quot;ClassA,&quot;); }&lt;br /&gt;3. class ClassB extends ClassA {&lt;br /&gt;4. public void process() throws IOException {&lt;br /&gt;5. super.process();&lt;br /&gt;6. System.out.print(&quot;ClassB,&quot;);&lt;br /&gt;7. throw new IOException();&lt;br /&gt;8. }&lt;br /&gt;9. public static void main(String[] args) {&lt;br /&gt;10. try { new ClassB().process(); }&lt;br /&gt;11. catch (IOException e) { System.out.println(&quot;Exception&quot;); }&lt;br /&gt;What is the result?&lt;/strong&gt;&lt;br /&gt;A. Exception&lt;br /&gt;B. ClassA,ClassB,Exception&lt;br /&gt;C. Compilation fails because of an error in line 10.&lt;br /&gt;D. Compilation fails because of an error in line 4.&lt;br /&gt;E. ClassA NullPointerException is thrown at runtime.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: D&lt;br /&gt;&lt;br /&gt;Q: 7 Given:&lt;br /&gt;1. try {&lt;br /&gt;2. // some code here&lt;br /&gt;3. } catch (NullPointerException e1) {&lt;br /&gt;4. System.out.print(&quot;exception1&quot;);&lt;br /&gt;5. } catch (RuntimeException e2) {&lt;br /&gt;6. System.out.print(&quot;exception2&quot;);&lt;br /&gt;7. } finally {&lt;br /&gt;8. System.out.print(&quot;exception3&quot;);&lt;br /&gt;9. }&lt;br /&gt;What is the result if exception1 NullPointerException occurs on line 34?&lt;/strong&gt;&lt;br /&gt;A. exception3&lt;br /&gt;B. exception1&lt;br /&gt;C. exception1exception2&lt;br /&gt;D. exception1exception3&lt;br /&gt;E. exception2exception3&lt;br /&gt;F. exception1exception2exception3&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: D&lt;br /&gt;&lt;br /&gt;Q: 8 Given:&lt;br /&gt;1. public static Collection get() {&lt;br /&gt;2. Collection sorted = new LinkedList();&lt;br /&gt;3. sorted.add(&quot;data2&quot;); sorted.add(&quot;data3&quot;); sorted.add(&quot;data1&quot;);&lt;br /&gt;4. return sorted;&lt;br /&gt;5. }&lt;br /&gt;6. public static void main(String[] args) {&lt;br /&gt;7. for (Object obj: get()) {&lt;br /&gt;8. System.out.print(obj + &quot;, &quot;);&lt;br /&gt;9. }&lt;br /&gt;10. }&lt;br /&gt;What is the result?&lt;/strong&gt;&lt;br /&gt;A. data1, data2, data3,&lt;br /&gt;B. data2, data3, data1,&lt;br /&gt;C. An exception is thrown at runtime.&lt;br /&gt;D. Compilation fails.&lt;br /&gt;E. The code runs with no output.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: B&lt;br /&gt;&lt;br /&gt;Q: 9 Given:&lt;br /&gt;1. int z = 5;&lt;br /&gt;2.&lt;br /&gt;3. public void stuff1(int x) {&lt;br /&gt;4. assert (x &gt; 0);&lt;br /&gt;5. switch(x) {&lt;br /&gt;6. case 2: x = 3;&lt;br /&gt;7. default: assert false; } }&lt;br /&gt;8.&lt;br /&gt;9. private void stuff2(int y) { assert (y &lt; 0); }&lt;br /&gt;10.&lt;br /&gt;11. private void stuff3() { assert (stuff4()); }&lt;br /&gt;12.&lt;br /&gt;13. private boolean stuff4() { z = 6; return false; }&lt;br /&gt;Which statement is true?&lt;/strong&gt;&lt;br /&gt;A. Only the assert statement on line 9 is used appropriately.&lt;br /&gt;B. All of the assert statements are used appropriately.&lt;br /&gt;C. The assert statements on lines 7 and 9 are used appropriately.&lt;br /&gt;D. The assert statements on lines 4 and 7 are used appropriately.&lt;br /&gt;E. The assert statements on lines 7 and 11 are used appropriately.&lt;br /&gt;F. The assert statements on lines 7, 9, and 11 are used appropriately.&lt;br /&gt;G. The assert statements on lines 4, 7, and 9 are used appropriately.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: C&lt;br /&gt;&lt;br /&gt;Q: 10 Given:&lt;br /&gt;1. public class Test {&lt;br /&gt;2. public static void main(String [] args) {&lt;br /&gt;3. int data1 = 5;&lt;br /&gt;4. boolean data2 = true;&lt;br /&gt;5. boolean data3 = false;&lt;br /&gt;6.&lt;br /&gt;7. if ((data1 == 4) &amp;amp;&amp;amp; !data3 )&lt;br /&gt;8. System.out.print(&quot;test1 &quot;);&lt;br /&gt;9. System.out.print(&quot;test2 &quot;);&lt;br /&gt;10. if ((data3 = true) &amp;amp;&amp;amp; data2 )&lt;br /&gt;11. System.out.print(&quot;test3 &quot;);&lt;br /&gt;12. }&lt;br /&gt;13. }&lt;br /&gt;What is the result?&lt;/strong&gt;&lt;br /&gt;A. test2&lt;br /&gt;B. test3&lt;br /&gt;C. test1 test2&lt;br /&gt;D. test2 test3&lt;br /&gt;E. test1 test2 test3&lt;br /&gt;F. An exception is thrown at runtime.&lt;br /&gt;G. Compilation fails.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Answer: D&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Hope you found this useful! Kindly give me your comments regarding the same.Many more Quizzes are yet to be posted! Kindly make use of them as much as possible! </content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/2809951237371667745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=2809951237371667745&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2809951237371667745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/2809951237371667745'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/java-quiz-14.html' title='Java Quiz -14'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6689202281665773296</id><published>2009-09-01T10:46:00.004+05:30</published><updated>2009-09-01T11:24:33.239+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java Quiz"/><title type='text'>Java Quiz -13</title><content type='html'>&lt;p&gt;Hi friends, &lt;br /&gt;&lt;br /&gt;Today I would like to post few more questions to test your capability. &lt;br /&gt;Dont worry guys, I will give you the answer too! Try to answer it yourself without referring to the answers to test yourself.&lt;strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 1 Given:&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;strong&gt;1. void waitTest() {&lt;br /&gt;2. Object obj = new Object();&lt;br /&gt;3. synchronized (Thread.currentThread()) {&lt;br /&gt;4. obj.wait();&lt;br /&gt;5. obj.notify();&lt;br /&gt;6. }&lt;br /&gt;7. }&lt;br /&gt;Which statement is true?&lt;/strong&gt;&lt;br /&gt;A. This code may throw an InterruptedException.&lt;br /&gt;B. This code may throw an IllegalStateException.&lt;br /&gt;C. This code may throw a TimeoutException after ten minutes.&lt;br /&gt;D. This code will not compile unless &quot;obj.wait()&quot; is replaced with &quot;((Thread) obj).wait()&quot;.&lt;br /&gt;E. Reversing the order of obj.wait() and obj.notify() may cause this method to complete normally.&lt;br /&gt;&lt;p&gt;F. A call to notify() or notifyAll() from another thread may cause this method to complete normally.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Answer: B&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 2 Given:&lt;br /&gt;1. public class TestClassA implements Runnable {&lt;br /&gt;2. public static void main (String[] args) throws Exception {&lt;br /&gt;3. Thread t = new Thread(new TestClassA());&lt;br /&gt;4. t.start();&lt;br /&gt;5. System.out.print(&quot;Started&quot;);&lt;br /&gt;6. t.join();&lt;br /&gt;7. System.out.print(&quot;Complete&quot;);&lt;br /&gt;8. }&lt;br /&gt;9. public void run() {&lt;br /&gt;10. for (int test = 0; test &lt; 4; test++) {&lt;br /&gt;11. System.out.print(test);&lt;br /&gt;12. }&lt;br /&gt;13. }&lt;br /&gt;14. }&lt;br /&gt;What can be a result?&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;A. An exception is thrown at runtime.&lt;br /&gt;B. The code executes and prints &quot;Started0123Complete&quot;.&lt;br /&gt;C. The code executes and prints &quot;StartedComplete&quot;.&lt;br /&gt;D. Compilation fails.&lt;br /&gt;E. The code executes and prints &quot;StartedComplete0123&quot;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer:B&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 3 Which ClassB code fragments will execute the method doData() in a separate&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;thread? (Choose two.)&lt;br /&gt;&lt;/strong&gt;A. new Thread() {&lt;br /&gt;public void run() { doData(); }&lt;br /&gt;};&lt;br /&gt;B. new Thread() {&lt;br /&gt;public void start() { doData(); }&lt;br /&gt;};&lt;br /&gt;C. new Thread() {&lt;br /&gt;public void start() { doData(); }&lt;br /&gt;}.run();&lt;br /&gt;D. new Thread() {&lt;br /&gt;public void run() { doData(); }&lt;br /&gt;}.start();&lt;br /&gt;E. new Thread(new Runnable() {&lt;br /&gt;public void run() { doData(); }&lt;br /&gt;}).run();&lt;br /&gt;F. new Thread(new Runnable() {&lt;br /&gt;public void run() { doData(); }&lt;br /&gt;}).start();&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: D, F&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 4 Given:&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;1. interface A { public int getData(); }&lt;br /&gt;2. class ClassB implements A {&lt;br /&gt;3. public int getData() { return 1; }&lt;br /&gt;4. }&lt;br /&gt;5. class ClassC extends B {&lt;br /&gt;6. // insert code here&lt;br /&gt;7. }&lt;br /&gt;Which ClassC code fragments, inserted individually at line 4, make use of polymorphism? (Choose three.)&lt;br /&gt;&lt;/strong&gt;A. public void add( ClassC c) { c.getData(); }&lt;br /&gt;B. public void add( ClassB b) { b.getData(); }&lt;br /&gt;C. public void add(A a) { a.getData(); }&lt;br /&gt;D. public void add(A a, ClassB b) { a.getData(); }&lt;br /&gt;E. public void add( ClassC c1, ClassC c2) { c1.getData(); }&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: B, C, D&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 5 Given:&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;1. public class ClassA {&lt;br /&gt;2.&lt;br /&gt;3. private String design;&lt;br /&gt;4. private Integer data;&lt;br /&gt;5. public String test;&lt;br /&gt;6.&lt;br /&gt;7. public void setClassdata(String design,&lt;br /&gt;8. String test,&lt;br /&gt;9. Integer data) {&lt;br /&gt;10. this.design = design;&lt;br /&gt;11. this.test = test;&lt;br /&gt;12. this.data = data;&lt;br /&gt;13. }&lt;br /&gt;14. }&lt;br /&gt;Which statement is true?&lt;br /&gt;&lt;/strong&gt;A. The class is fully encapsulated.&lt;br /&gt;B. The code demonstrates polymorphism.&lt;br /&gt;C. The test variable breaks encapsulation.&lt;br /&gt;D. The design and data variables break polymorphism.&lt;br /&gt;E. The setClassdata method breaks encapsulation.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: C&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 6 Given:&lt;br /&gt;1. package test;&lt;br /&gt;2.&lt;br /&gt;3. class ClassA {&lt;br /&gt;4. public String data = &quot;Java Quiz&quot;;&lt;br /&gt;5. }&lt;br /&gt;What can directly access and change the value of the variable data?&lt;br /&gt;&lt;/strong&gt;A. any class&lt;br /&gt;B. only the ClassA class&lt;br /&gt;C. any class in the test package&lt;br /&gt;D. any class that extends ClassA&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: C&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 7 Given:&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;1. class ClassA { public String quiz() { return &quot;answers&quot;; } }&lt;br /&gt;2. class ClassB extends ClassA {&lt;br /&gt;3. public String quiz() { return &quot;Test Answers&quot;; }&lt;br /&gt;4. }&lt;br /&gt;5. class ClassC extends ClassA {&lt;br /&gt;6. public String quiz() { return &quot;Test Data&quot;; }&lt;br /&gt;7. }&lt;br /&gt;...&lt;br /&gt;11. ClassA ClassA = new ClassB();&lt;br /&gt;12. ClassC ClassC = (ClassC)ClassA;&lt;br /&gt;13. System.out.println(ClassC.quiz());&lt;br /&gt;What is the result?&lt;br /&gt;&lt;/strong&gt;A. answers&lt;br /&gt;B. Test Answers&lt;br /&gt;C. Test Data&lt;br /&gt;D. Compilation fails.&lt;br /&gt;E. An exception is thrown at runtime.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: E&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 8 Which three statements are true?&lt;br /&gt;&lt;/strong&gt;A. A final method in class ClassA can be abstract if and only if ClassA is abstract.&lt;br /&gt;B. A protected method in class ClassA can be overridden by any subclass of ClassA.&lt;br /&gt;C. A private static method can be called only within other static methods in class ClassA.&lt;br /&gt;D. A non-static public final method in class ClassA can be overridden in any subclass of ClassA.&lt;br /&gt;E. A public static method in class ClassA can be called by a subclass of ClassA without explicitly referencing the class ClassA.&lt;br /&gt;F. A method with the same signature as a private final method in class ClassA can be implemented in a subclass of ClassA.&lt;br /&gt;G. A protected method in class ClassA can be overridden by a subclass of A only if the subclass is in the same package as ClassA.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: B, E, F&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 9 Which two statements are true about has-a and is-a relationships? &lt;br /&gt;&lt;/strong&gt;A. Inheritance represents a has-a relationship.&lt;br /&gt;B. Inheritance represents an is-a relationship.&lt;br /&gt;C. Instance variables can be used when creating a has-a relationship.&lt;br /&gt;D.  Interfaces must be used when creating a has-a relationship.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;br /&gt;Answer: B, C&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Q: 10  Given:&lt;br /&gt;&lt;/strong&gt;&lt;strong&gt;11. Runnable r = new Runnable() {&lt;br /&gt;12. public void testData() {&lt;br /&gt;13. System.out.print(&quot;Test Quiz Data&quot;);&lt;br /&gt;14. }&lt;br /&gt;15. };&lt;br /&gt;16. Thread t = new Thread(r) {&lt;br /&gt;17. public void testData() {&lt;br /&gt;18. System.out.print(&quot;Answer it yourself&quot;);&lt;br /&gt;19. }&lt;br /&gt;20. };&lt;br /&gt;21. t.start();&lt;br /&gt;What is the result?&lt;br /&gt;&lt;/strong&gt;A. Test Quiz Data&lt;br /&gt;B. Answer it yourself&lt;br /&gt;C. Compilation fails.&lt;br /&gt;D. The code runs with no output.&lt;br /&gt;E. An exception is thrown at runtime.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;br /&gt;Answer: B&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Hope you found this useful! Kindly give me your comments regarding the same.Many more Quizzes are yet to be posted! Kindly make use of them as much as possible! &lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6689202281665773296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6689202281665773296&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6689202281665773296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6689202281665773296'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/09/java-quiz-13.html' title='Java Quiz -13'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1246487936314048633.post-6392182187172237156</id><published>2009-08-31T18:59:00.003+05:30</published><updated>2009-08-31T19:08:46.849+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Preparing For Certification"/><title type='text'>Preparing For SCJP Certification</title><content type='html'>&lt;p&gt;Hi friends,&lt;/p&gt;&lt;p&gt;Today I would like to share my experience both during my preparation and on the day of the SCJP exam which I took on the previous Saturday(29/08/2009).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;POINT TO NOTE:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are totally seven parts that evaluate a candidate in an SCJP test.&lt;br /&gt;&lt;br /&gt;* Declaration,Initialization and scoping&lt;br /&gt;* Flow Control&lt;br /&gt;* API Contents&lt;br /&gt;* Concurrency&lt;br /&gt;* OO Concepts&lt;br /&gt;* Collections/Generics&lt;br /&gt;* Fundamentals&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PREPARATION:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;First of all I took my certification seriously as this is going to be my first stepping stone.I studied smart and utilized as much time as possible, for the exam.&lt;br /&gt;&lt;br /&gt;I started my preparation about five months back. I started with the book&lt;br /&gt;SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055) by Katherine Sierra and Bert Bates&lt;br /&gt;&lt;br /&gt;To get my Fundamentals strong, I referred the book,&lt;br /&gt;Head First Java by Katherine Sierra and Bert Bates&lt;br /&gt;Both these books cover all the portions that are needed for the SCJP 1.5 exam.&lt;br /&gt;Head first Java was very helpful to understand the concepts and was a good support when I needed a concept in SCJP book to be explained in more detail.&lt;br /&gt;&lt;br /&gt;I also had the help of many of our associates who taught me how to view a problem in the exam.&lt;br /&gt;Two typical examples, &lt;br /&gt;Before starting, I find out problems that can be easily solved and solve them.I solve the rest when I go through it the next time. This ensures that I have a favourable number questions that help me clear the exam, and in the second pass, I concentrate on the rest to ensure that I get as many questions right as possible and score high.&lt;br /&gt;&lt;br /&gt;If I was spending some time on a problem, I make sure that I complete it before proceeding further. This would save a lot of time for going through all the questions again.&lt;br /&gt;&lt;br /&gt;Apart from that I referred to various Mock Tests available online and I made sure that I didnt go by their solution if I felt that the answer given to be confusing.&lt;br /&gt;This helped me a lot and I learnt something new each time I attended one.&lt;br /&gt;I used to solve the code snippets and had found some examples which were given wrong solutions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DURING THE EXAM:&lt;br /&gt;&lt;br /&gt;During the exam, I felt the same tension that I had during my degree exam. But I would assure you that you dont have to worry, there is ample time. Three hours for sixty questions and you have choice for the answers too!&lt;br /&gt;&lt;br /&gt;There are two type of questions according to my classification,&lt;br /&gt;One type is  that we have to judge what is the output from a set of choices, and &lt;br /&gt;In Second type, you are given some code snippets and are asked to arrange them in a proper sequence so that you get some specific output.&lt;br /&gt;Especially for the second type, the online questions which I had tested myself earlier came to my   help and I solved them easily.&lt;br /&gt;&lt;br /&gt;Remember that you are not given ant or eclipse in the exam. Everything has to be done by your mind and the paper pad.&lt;br /&gt;&lt;br /&gt;I completed my test in about one and a half hours. At the end of one and a half hours, I was confident of fifty five questions out of sixty to be correct.&lt;br /&gt;&lt;br /&gt;This confidence made me bold and I tried my best on the other five questions.&lt;br /&gt;At the end, As I submitted I got the result immediately and all my tension got subsided on seeing the result.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;MY TOTAL SCORE  93.00%&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ASSESMENT SECTION&lt;br /&gt;SECTION ANALYSIS&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Declaration,Initialization and scoping  90.00%&lt;br /&gt;Flow Control  81.00%&lt;br /&gt;API Contents  100.00%&lt;br /&gt;Concurrency  100.00%&lt;br /&gt;OO Concepts  90.00%&lt;br /&gt;Collections/Generics  100.00%&lt;br /&gt;Fundamentals  100.00%&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel="related" href="http://helptotheneeded.blogspot.com/2009/08/Preparing-For-Certification.html" title="Preparing For SCJP Certification"/><link rel='replies' type='application/atom+xml' href='http://helptotheneeded.blogspot.com/feeds/6392182187172237156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1246487936314048633&amp;postID=6392182187172237156&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6392182187172237156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1246487936314048633/posts/default/6392182187172237156'/><link rel='alternate' type='text/html' href='http://helptotheneeded.blogspot.com/2009/08/preparing-for-scjp-certification.html' title='Preparing For SCJP Certification'/><author><name>Chandrasekar</name><uri>http://www.blogger.com/profile/05960622003014894159</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_YDxv9l_TcKc/TVTElryfHFI/AAAAAAAAAJk/388InORMUMY/s220/41471_100000744828540_2754_q.jpg'/></author><thr:total>2</thr:total></entry></feed>