<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7599763506450290348</id><updated>2011-05-30T04:14:18.296-07:00</updated><title type='text'>Java/J2EE</title><subtitle type='html'>The questions answered here are the ones that cropped in my mind when i started learning Java/J2EE.The list will be certainly will be enhanced as time progresses.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-7122164361639762720</id><published>2006-12-06T02:36:00.001-08:00</published><updated>2006-12-06T02:36:56.926-08:00</updated><title type='text'>Statements in JAVA</title><content type='html'>Statements are equivalent to sentences in natural languages. A statement forms a complete unit of execution. The following types of expressions can be made into a statement by terminating the expression with a semicolon (  :&lt;br /&gt;&lt;br /&gt;    * Assignment expressions&lt;br /&gt;    * Any use of ++ or --&lt;br /&gt;    * Method calls&lt;br /&gt;    * Object creation expressions&lt;br /&gt;&lt;br /&gt;These kinds of statements are called expression statements.&lt;br /&gt;&lt;br /&gt;In addition to these kinds of expression statements, there are two other kinds of statements. A declaration statement declares a variable. A control flow statement regulates the order in which statements get executed. The for loop and the if statement are both examples of control flow statements.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-7122164361639762720?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/7122164361639762720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=7122164361639762720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/7122164361639762720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/7122164361639762720'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/statements-in-java.html' title='Statements in JAVA'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-8176794979861807410</id><published>2006-12-06T02:34:00.000-08:00</published><updated>2006-12-06T02:35:53.852-08:00</updated><title type='text'>How will you pass values from HTML page to the Servlet</title><content type='html'>First we put the values to be passed inside a HTML form and then call the servlet in the form action. To catch the form fields values we simply call the getParameter method of the HttpServletRequest, supplying the parameter name as an argument. The return value is a String corresponding to the first occurrence of that parameter name. An empty String is returned if the parameter exists but has no value, and null is returned if there was no such parameter.&lt;br /&gt;&lt;br /&gt;If the parameter could potentially have more than one value we should call getParameterValues instead of getParameter. This returns an array of strings. To get a full list of parameters we can use getParameterNames which returns an Enumeration, each entry of which can be cast to a String and used in a getParameter call.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-8176794979861807410?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/8176794979861807410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=8176794979861807410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/8176794979861807410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/8176794979861807410'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/how-will-you-pass-values-from-html-page.html' title='How will you pass values from HTML page to the Servlet'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-5411004570233217403</id><published>2006-12-06T02:33:00.000-08:00</published><updated>2006-12-06T02:34:33.835-08:00</updated><title type='text'>Difference between RMI &amp; Corba</title><content type='html'>The most significant difference between RMI and CORBA is that CORBA was made specifically for interoperability across programming languages. That is CORBA fosters the notion that programs can be built to interact in multiple languages. The server could be written in C++, the business logic in Python, and the front-end written in COBOL in theory. RMI, on the other hand is a total Java solution, the interfaces, the implementations and the clients--all are written in Java.&lt;br /&gt;&lt;br /&gt;RMI allows dynamic loading of classes at runtime. In a multi-language CORBA environment, dynamic class loading is not possible. The important advantage to dynamic class loading is that it allows arguments to be passed in remote invocations that are subtypes of the declared types. In CORBA, all types have to be known in advance. RMI (as well as RMI/IIOP) provides support for polymorphic parameter passing, whereas strict CORBA does not. CORBA does have support for multiple languages which is good for some applications, but RMI has the advantage of being dynamic, which is good for other applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-5411004570233217403?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/5411004570233217403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=5411004570233217403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5411004570233217403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5411004570233217403'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/difference-between-rmi-corba.html' title='Difference between RMI &amp; Corba'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-2529276195651372076</id><published>2006-12-06T02:30:00.000-08:00</published><updated>2006-12-06T02:32:24.915-08:00</updated><title type='text'>In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that ?</title><content type='html'>We can use the setTimeout method to use delay time and then the window.open method to open the new page. The script could be something like the following. We could call the doPopup() method on the click event of the button placed on our webpage.&lt;br /&gt;&lt;br /&gt;    code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    &lt;!--&lt;SCRIPT LANGUAGE="--JavaScript"&gt;&lt;br /&gt;        function Start(URL) {&lt;br /&gt;     preview = window.open(URL,"Page Title"); &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    function doPopup() {&lt;br /&gt;    url = "my PopupPage.html";&lt;br /&gt;    delay =15;&lt;br /&gt;    timer = setTimeout("Start(url)", delay*1000);&lt;br /&gt;    }&lt;br /&gt;    // End&lt;br /&gt;    &lt;/script&gt;&lt;br /&gt;      --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-2529276195651372076?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/2529276195651372076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=2529276195651372076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/2529276195651372076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/2529276195651372076'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/in-html-form-i-have-button-which-makes_06.html' title='In an HTML form I have a Button which makes us to open another page in 15 seconds. How will do you that ?'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-777668538907160800</id><published>2006-12-06T02:25:00.000-08:00</published><updated>2006-12-06T02:28:26.700-08:00</updated><title type='text'>What is JDBC? How do you connect to the Database?</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;JDBC stands for Java Database Connectivity. Its a set of programming APIs which allow easy connection to a wide range of databases through Java programs.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;To connect to the database we will need to load the database driver and then request a connection as below:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial;font-size:78%;"&gt;code:&lt;/span&gt;&lt;/span&gt;&lt;hr style="height: 2px;"&gt;&lt;pre&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;Class.forName(LOCATION OF DRIVER);&lt;br /&gt;Connection jdbcConnection =  DriverManager.getConnection (LOCATION OF DATASOURCE)&lt;br /&gt;&lt;br /&gt;____________________________________________________________________________________________________________________&lt;br /&gt;&lt;br /&gt;Once ur done with it.You would have the Connection Object(&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:Verdana, Arial;"&gt;jdbcConnection )&lt;/span&gt;&lt;/span&gt; &lt;/pre&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-777668538907160800?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/777668538907160800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=777668538907160800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/777668538907160800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/777668538907160800'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/what-is-jdbc-how-do-you-connect-to.html' title='What is JDBC? How do you connect to the Database?'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-2422965407628452084</id><published>2006-12-06T02:24:00.000-08:00</published><updated>2006-12-06T02:25:48.467-08:00</updated><title type='text'>Why Servlets</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;Servlets may be used at different levels on a distributed framework. The following are some examples of servlet usage:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;&lt;li&gt;To accept form input and generate HTML Web pages dynamically.&lt;/li&gt;&lt;li&gt;As part of middle tiers in enterprise networks by connecting to SQL databases via JDBC. &lt;/li&gt;&lt;li&gt;In conjunction with applets to provide a high degree of interactivity and dynamic Web content generation. &lt;/li&gt;&lt;li&gt;For collaborative applications such as online conferencing. &lt;/li&gt;&lt;li&gt;A community of servlets could act as active agents which share data with each other. &lt;/li&gt;&lt;li&gt;Servlets could be used for balancing load among servers which mirror the same content. &lt;/li&gt;&lt;li&gt;Protocol support is one of the most viable uses for servlets. For example, a file service can start with NFS and move on to as many protocols as desired; the transfer between the protocols would be made transparent by servlets. Servlets could be used for tunneling over HTTP to provide chat, newsgroup or other file server functions. &lt;/li&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-2422965407628452084?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/2422965407628452084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=2422965407628452084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/2422965407628452084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/2422965407628452084'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/why-servlets.html' title='Why Servlets'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-5172588208782411151</id><published>2006-12-06T02:23:00.000-08:00</published><updated>2006-12-06T02:24:27.322-08:00</updated><title type='text'>RMI Architecture(in brief)</title><content type='html'>&lt;p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;RMI uses a layered architecture, each of the layers could be enhanced or replaced without affecting the rest of the system. The details of layers can be summarised as follows:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;&lt;li&gt;&lt;i&gt;Application Layer&lt;/i&gt;: The client and server program&lt;/li&gt;&lt;li&gt;&lt;i&gt;Stub &amp; Skeleton Layer&lt;/i&gt;: Intercepts method calls made by the client/redirects these calls to a remote RMI service. &lt;/li&gt;&lt;li&gt;&lt;i&gt;Remote Reference Layer&lt;/i&gt;: Understands how to interpret and manage references made from clients to the remote service  objects. &lt;/li&gt;&lt;li&gt;&lt;i&gt;Transport layer&lt;/i&gt;: Based on TCP/IP connections between machines in a network. It provides basic connectivity, as well as some firewall penetration strategies. &lt;/li&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-5172588208782411151?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/5172588208782411151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=5172588208782411151' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5172588208782411151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5172588208782411151'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/rmi-architecturein-brief.html' title='RMI Architecture(in brief)'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-4124874958920632029</id><published>2006-12-06T02:22:00.000-08:00</published><updated>2006-12-06T02:23:34.946-08:00</updated><title type='text'>What is the difference between C++ &amp; Java</title><content type='html'>Well as Bjarne Stroustrup says "..despite the syntactic similarities, C++ and Java are very different languages. In many ways, Java seems closer to Smalltalk than to C++..". Here are few I discovered:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Verdana, Arial;font-size:85%;"&gt;&lt;li&gt;Java is multithreaded&lt;/li&gt;&lt;li&gt;Java has no pointers&lt;/li&gt;&lt;li&gt;Java has automatic memory management (garbage collection)&lt;/li&gt;&lt;li&gt;Java is platform independent (Stroustrup may differ by saying "Java &lt;i&gt;is&lt;/i&gt; a platform"  )&lt;/li&gt;&lt;li&gt;Java has built-in support for comment documentation&lt;/li&gt;&lt;li&gt;Java has no operator overloading&lt;/li&gt;&lt;li&gt;Java doesn?t provide multiple inheritance &lt;/li&gt;&lt;li&gt;There are no destructors in Java&lt;/li&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-4124874958920632029?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/4124874958920632029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=4124874958920632029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/4124874958920632029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/4124874958920632029'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/what-is-difference-between-c-java.html' title='What is the difference between C++ &amp; Java'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-8997678862036198946</id><published>2006-12-06T02:21:00.000-08:00</published><updated>2006-12-06T02:22:16.508-08:00</updated><title type='text'>What do you know about the garbage collector?</title><content type='html'>Garbage collector is a runtime component of Java which sits on top of the heap: memory area from which Java objects are created and periodically scans it for objects which are eligible to be reclaimed when there are no references to these objects in the program. There is simply no way to force garbage collection, but you can suggest your intention of getting the object garbage collecetd to Java Virtual Machine by calling&lt;p class="paragraph"&gt;code: &lt;/p&gt;&lt;pre&gt;System.gc()&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-8997678862036198946?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/8997678862036198946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=8997678862036198946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/8997678862036198946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/8997678862036198946'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/what-do-you-know-about-garbage.html' title='What do you know about the garbage collector?'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-5385209216178783363</id><published>2006-12-06T02:19:00.000-08:00</published><updated>2006-12-06T02:20:58.915-08:00</updated><title type='text'>What is user defined exception?</title><content type='html'>&lt;p class="paragraph"&gt;User-defined exceptions may be implemented by &lt;/p&gt;&lt;ul class="star"&gt;&lt;li&gt;defining a class to respond to the exception and&lt;/li&gt;&lt;li&gt;embedding a throw statement in the try block where the exception can occur or declaring that the method throws the exception (to another method where it is handled).&lt;/li&gt;&lt;/ul&gt;The developer can define a new exception by deriving it from the Exception class as follows:&lt;p class="paragraph"&gt;    &lt;/p&gt;&lt;pre&gt;&lt;p class="paragraph"&gt;     &lt;br /&gt;   public class  MyException  extends  Exception  {&lt;br /&gt;   /&lt;strong class="strong"&gt; class definition of constructors (but NOT the exception handling code) goes here &lt;/strong&gt;/&lt;br /&gt;    public  MyException()  {&lt;br /&gt;     super();&lt;br /&gt;    }&lt;/p&gt;&lt;p class="paragraph"&gt;    public MyException( String errorMessage ) {&lt;br /&gt;   super( errorMessage );&lt;br /&gt;   }&lt;br /&gt;   }&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;&lt;p class="paragraph"&gt;The throw statement is used to signal the occurance of the exception within a try block. Often, exceptions are instantiated in the same statement in which they are thrown using the syntax.&lt;/p&gt;&lt;p class="paragraph"&gt;    &lt;code&gt;     throw new MyException("I threw my own exception.") &lt;/code&gt; To handle the exception within the method where it is thrown, a catch statement that handles MyException, must follow the try block. If the developer does not want to handle the exception in the method itself, the method must pass the exception using the syntax:&lt;/p&gt;&lt;p class="paragraph"&gt;    code:&lt;/p&gt;&lt;p class="paragraph"&gt;           public myMethodName() throws MyException           &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-5385209216178783363?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/5385209216178783363/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=5385209216178783363' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5385209216178783363'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5385209216178783363'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/what-is-user-defined-exception.html' title='What is user defined exception?'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-8914410433854580072</id><published>2006-12-06T02:17:00.000-08:00</published><updated>2006-12-06T02:19:49.839-08:00</updated><title type='text'>What is the diffrence between an Abstract class and Interface?</title><content type='html'>&lt;ul class="star"&gt;&lt;li&gt;Abstract classes may have some executable methods and methods left unimplemented. Interfaces contain no implementation code.&lt;/li&gt;&lt;li&gt;A class can implement any number of interfaces, but subclass at most one abstract class.&lt;/li&gt;&lt;li&gt;An abstract class can have nonabstract methods. All methods of an interface are abstract.&lt;/li&gt;&lt;li&gt;An abstract class can have instance variables. An interface cannot.&lt;/li&gt;&lt;li&gt;An abstract class can define constructor. An interface cannot.&lt;/li&gt;&lt;li&gt;An abstract class can have any visibility: public, protected, private or none (package). An interface's visibility must be public or none (package).&lt;/li&gt;&lt;li&gt;An abstract class inherits from Object and includes methods such as clone() and equals().&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-8914410433854580072?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/8914410433854580072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=8914410433854580072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/8914410433854580072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/8914410433854580072'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/what-is-diffrence-between-abstract.html' title='What is the diffrence between an Abstract class and Interface?'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7599763506450290348.post-5767445336739016995</id><published>2006-12-06T01:59:00.001-08:00</published><updated>2006-12-06T02:13:21.675-08:00</updated><title type='text'>public static void main(String args[])</title><content type='html'>Hi There&lt;br /&gt;&lt;br /&gt;The first question for a novice Java Programmer would be-why is the signature of  main  method  the  way  it  is&lt;br /&gt;&lt;br /&gt;1)public--  Because  the  main  method  is invoked  by  JVM (which is an outsider).So  giving                              public access  is very much important.&lt;br /&gt;2)static--Becasue the main method should be invoked without instantiating the class which has                      the main method.&lt;br /&gt;3)void--Because the return type of the method is null.&lt;br /&gt;4)String args[]--To accept data from command line(command lin earguements).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7599763506450290348-5767445336739016995?l=boyztechnicallyunited.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://boyztechnicallyunited.blogspot.com/feeds/5767445336739016995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7599763506450290348&amp;postID=5767445336739016995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5767445336739016995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7599763506450290348/posts/default/5767445336739016995'/><link rel='alternate' type='text/html' href='http://boyztechnicallyunited.blogspot.com/2006/12/public-static-void-mainstring-args.html' title='public static void main(String args[])'/><author><name>Resurgent</name><uri>http://www.blogger.com/profile/13543595273575256571</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
