<?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-7034933824878235611</id><updated>2011-07-08T05:20:48.526-07:00</updated><title type='text'>PROGRAMMING</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7034933824878235611.post-8788136670459128075</id><published>2009-11-21T07:22:00.000-08:00</published><updated>2009-11-21T07:34:53.329-08:00</updated><title type='text'></title><content type='html'>&lt;p&gt; Resizable-array implementation of the &lt;tt&gt;List&lt;/tt&gt; interface.  Implements  all optional list operations, and permits all elements, including  &lt;tt&gt;null&lt;/tt&gt;.  In addition to implementing the &lt;tt&gt;List&lt;/tt&gt; interface,  this class provides methods to manipulate the size of the array that is  used internally to store the list.  (This class is roughly equivalent to  &lt;tt&gt;Vector&lt;/tt&gt;, except that it is unsynchronized.)&lt;/p&gt;&lt;p&gt;   The &lt;tt&gt;size&lt;/tt&gt;, &lt;tt&gt;isEmpty&lt;/tt&gt;, &lt;tt&gt;get&lt;/tt&gt;, &lt;tt&gt;set&lt;/tt&gt;,  &lt;tt&gt;iterator&lt;/tt&gt;, and &lt;tt&gt;listIterator&lt;/tt&gt; operations run in constant  time.  The &lt;tt&gt;add&lt;/tt&gt; operation runs in &lt;i&gt;amortized constant time&lt;/i&gt;,  that is, adding n elements requires O(n) time.  All of the other operations  run in linear time (roughly speaking).  The constant factor is low compared  to that for the &lt;tt&gt;LinkedList&lt;/tt&gt; implementation.&lt;/p&gt;&lt;p&gt;   Each &lt;tt&gt;ArrayList&lt;/tt&gt; instance has a &lt;i&gt;capacity&lt;/i&gt;.  The capacity is  the size of the array used to store the elements in the list.  It is always  at least as large as the list size.  As elements are added to an ArrayList,  its capacity grows automatically.  The details of the growth policy are not  specified beyond the fact that adding an element has constant amortized  time cost.&lt;/p&gt;&lt;p&gt;    An application can increase the capacity of an &lt;tt&gt;ArrayList&lt;/tt&gt; instance  before adding a large number of elements using the &lt;tt&gt;ensureCapacity&lt;/tt&gt;  operation.  This may reduce the amount of incremental reallocation.&lt;/p&gt;&lt;p&gt;   &lt;strong&gt;Note that this implementation is not synchronized.&lt;/strong&gt; If  multiple threads access an &lt;tt&gt;ArrayList&lt;/tt&gt; instance concurrently, and at  least one of the threads modifies the list structurally, it &lt;i&gt;must&lt;/i&gt; be  synchronized externally.  (A structural modification is any operation that  adds or deletes one or more elements, or explicitly resizes the backing  array; merely setting the value of an element is not a structural  modification.)  This is typically accomplished by synchronizing on some  object that naturally encapsulates the list.  If no such object exists, the  list should be "wrapped" using the &lt;tt&gt;Collections.synchronizedList&lt;/tt&gt;  method.  This is best done at creation time, to prevent accidental  unsynchronized access to the list:  &lt;/p&gt;&lt;pre&gt; List list = Collections.synchronizedList(new ArrayList(...));&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;   The iterators returned by this class's &lt;tt&gt;iterator&lt;/tt&gt; and  &lt;tt&gt;listIterator&lt;/tt&gt; methods are &lt;i&gt;fail-fast&lt;/i&gt;: if list is structurally  modified at any time after the iterator is created, in any way except  through the iterator's own remove or add methods, the iterator will throw a  ConcurrentModificationException.  Thus, in the face of concurrent  modification, the iterator fails quickly and cleanly, rather than risking  arbitrary, non-deterministic behavior at an undetermined time in the  future.&lt;/p&gt;&lt;p&gt;   Note that the fail-fast behavior of an iterator cannot be guaranteed  as it is, generally speaking, impossible to make any hard guarantees in the  presence of unsynchronized concurrent modification.  Fail-fast iterators  throw &lt;tt&gt;ConcurrentModificationException&lt;/tt&gt; on a best-effort basis.   Therefore, it would be wrong to write a program that depended on this  exception for its correctness: &lt;i&gt;the fail-fast behavior of iterators  should be used only to detect bugs.&lt;/i&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-8788136670459128075?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/8788136670459128075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=8788136670459128075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/8788136670459128075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/8788136670459128075'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2009/11/resizable-array-implementation-of-list.html' title=''/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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-7034933824878235611.post-2995177933791613173</id><published>2008-05-24T22:49:00.000-07:00</published><updated>2008-05-24T22:50:38.361-07:00</updated><title type='text'>Using the XMLHttpRequest Object</title><content type='html'>As mentioned, the XMLHttpRequest object is the heart of AJAX. This object sends requests&lt;br /&gt;to the server and processes the responses from it. In versions of Internet Explorer prior&lt;br /&gt;to IE7, it is implemented using ActiveX, whereas in other browsers, such as Mozilla&lt;br /&gt;Firefox, Safari, Opera, and Internet Explorer 7, it is a native JavaScript object. Unfortunately,&lt;br /&gt;because of these differences, you need to write JavaScript code that inspects the&lt;br /&gt;browser type and creates an instance of it using the correct technology.&lt;br /&gt;Thankfully, this process is a little simpler than the spaghetti code you may remember&lt;br /&gt;having to write when using JavaScript functions that heavily used DOM, which had to&lt;br /&gt;work across browsers:&lt;br /&gt;var xmlHttp;&lt;br /&gt;function createXMLHttpRequest()&lt;br /&gt;{&lt;br /&gt;if (window.ActiveXObject)&lt;br /&gt;{&lt;br /&gt;xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");&lt;br /&gt;}&lt;br /&gt;else if (window.XMLHttpRequest)&lt;br /&gt;{&lt;br /&gt;xmlHttp = new XMLHttpRequest();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;In this case, the code is simple. If the browser doesn’t support ActiveX objects, the&lt;br /&gt;window.ActiveXObject property will be null, and, therefore, the xmlHttp variable will be set&lt;br /&gt;to a new instance of the native JavaScript XMLHttpRequest object; otherwise, a new&lt;br /&gt;instance of the Microsoft.XMLHTTP ActiveX Object will be created.&lt;br /&gt;Now that you have an XMLHttpRequest object at your beck and call, you can start&lt;br /&gt;playing with its methods and properties. Some of the more common methods you can&lt;br /&gt;use are discussed in the next few paragraphs.&lt;br /&gt;The open method initializes your request by setting up the call to your server. It takes&lt;br /&gt;two required arguments (the Hypertext Transfer Protocol [HTTP] command such as GET,&lt;br /&gt;POST, or PUT, and the URL of the resource you are calling) and three optional arguments&lt;br /&gt;(a boolean indicating whether you want the call to be asynchronous, which defaults to&lt;br /&gt;true, and strings for the username and password if required by the server for security).&lt;br /&gt;It returns void.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-2995177933791613173?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/2995177933791613173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=2995177933791613173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/2995177933791613173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/2995177933791613173'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2008/05/using-xmlhttprequest-object.html' title='Using the XMLHttpRequest Object'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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-7034933824878235611.post-6274954655665874428</id><published>2008-05-24T22:44:00.000-07:00</published><updated>2008-05-24T22:49:15.020-07:00</updated><title type='text'>Introduction ASP</title><content type='html'>AJAX is fast becoming a de facto standard for developing responsive and rich web&lt;br /&gt;applications. This evolutionary step in the user experience is being used in more and&lt;br /&gt;more web applications from Outlook Web Access to Google maps and beyond.&lt;br /&gt;But how do you write AJAX applications? Not too long ago, you had to be a JavaScript&lt;br /&gt;expert and use tools that are not as sophisticated as those used in standard ASP.NET&lt;br /&gt;development. As such, it had been difficult and time-consuming to develop, debug, and&lt;br /&gt;maintain AJAX applications despite their innate user friendliness. However, as the popularity&lt;br /&gt;and use of AJAX web applications rose, so did a number of frameworks designed to&lt;br /&gt;ease AJAX development by providing more out-of-the-box functionality. A few of those&lt;br /&gt;packages had been somewhat geared toward developers working with ASP.NET.&lt;br /&gt;After a long beta period, in early 2007, Microsoft officially released the ASP.NET AJAX&lt;br /&gt;Extensions, which include a set of client- and server-side controls and functionality&lt;br /&gt;leveraging some of the existing technologies in ASP.NET. This release also included the&lt;br /&gt;ASP.NET AJAX Toolkit, which contains a set of control extenders that offer enhanced UI&lt;br /&gt;effects and built-in AJAX capabilities that can be used on a page with very little development&lt;br /&gt;effort. With this release, Microsoft brought about major productivity leaps to AJAX&lt;br /&gt;development in the world of ASP.NET.&lt;br /&gt;With ASP.NET AJAX, you can easily convert your existing ASP.NET applications to&lt;br /&gt;AJAX applications, and you can add sophisticated user interface elements such as drag&lt;br /&gt;and drop, networking, and browser compatibility layers, with simple declarative programming&lt;br /&gt;(or, if you prefer to use JavaScript, you can do that too).&lt;br /&gt;This book is a primer on this technology. It introduces you to ASP.NET AJAX, explores&lt;br /&gt;some of the main features and controls, and takes you into how to build AJAX applications&lt;br /&gt;quickly and simply, taking advantage of the IDE productivity offered by Visual&lt;br /&gt;Studio.&lt;br /&gt;It’s going to be a fun ride, and by the end of it, you’ll be an expert in Web 2.0 and&lt;br /&gt;hungry to start developing for it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-6274954655665874428?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/6274954655665874428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=6274954655665874428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/6274954655665874428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/6274954655665874428'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2008/05/introduction-asp.html' title='Introduction ASP'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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-7034933824878235611.post-5736408882691508780</id><published>2007-12-18T04:26:00.000-08:00</published><updated>2007-12-18T04:32:08.157-08:00</updated><title type='text'>Visual Basic</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://upload.wikimedia.org/wikipedia/en/9/92/VB_cover.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px;" src="http://upload.wikimedia.org/wikipedia/en/9/92/VB_cover.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Visual Basic (VB) is a third-generation event driven programming language and associated development environment from Microsoft for its COM programming model.[1] Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using DAO, RDO, or ADO, and creation of ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically similar to Visual Basic, but perform differently.[2]&lt;br /&gt;&lt;br /&gt;A programmer can put together an application using the components provided with Visual Basic itself. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declarations.&lt;br /&gt;&lt;br /&gt;In business programming, Visual Basic has one of the largest user bases. In a survey conducted in 2005, 62 percent of developers reported using some form of Visual Basic. It currently competes with C++, JavaScript, C# and Java for dominance in the business world.[3]&lt;br /&gt;Contents&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    * 1 Language features&lt;br /&gt;    * 2 Characteristics present in Visual Basic&lt;br /&gt;    * 3 Evolution of Visual Basic&lt;br /&gt;          o 3.1 Timeline of Visual Basic (VB1 to VB6)&lt;br /&gt;    * 4 Derivative languages&lt;br /&gt;    * 5 Performance and other issues&lt;br /&gt;    * 6 Sample code&lt;br /&gt;    * 7 See also&lt;br /&gt;    * 8 References&lt;br /&gt;    * 9 External links&lt;br /&gt;&lt;br /&gt; Language features&lt;br /&gt;An example of a session in Microsoft Visual Basic 6&lt;br /&gt;An example of a session in Microsoft Visual Basic 6&lt;br /&gt;&lt;br /&gt;Visual Basic was designed to be easy to learn and use. The language not only allows programmers to create simple GUI applications, but can also develop fairly complex applications as well. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality. Since default attributes and actions are defined for the components, a simple program can be created without the programmer having to write many lines of code. Performance problems were experienced by earlier versions, but with faster computers and native code compilation this has become less of an issue.&lt;br /&gt;&lt;br /&gt;Although programs can be compiled into native code executables from version 5 onwards, they still require the presence of runtime libraries of approximately 2 MB in size. This runtime is included by default in Windows 2000 and later, but for earlier versions of Windows it must be distributed together with the executable.&lt;br /&gt;&lt;br /&gt;Forms are created using drag and drop techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.&lt;br /&gt;&lt;br /&gt;Visual Basic can create executables (EXE files), ActiveX controls, DLL files, but is primarily used to develop Windows applications and to interface web database systems. Dialog boxes with less functionality (e.g., no maximize/minimize control) can be used to provide pop-up capabilities. Controls provide the basic functionality of the application, while programmers can insert additional logic within the appropriate event handlers. For example, a drop-down combination box will automatically display its list and allow the user to select any element. An event handler is called when an item is selected, which can then execute additional code created by the programmer to perform some action based on which element was selected, such as populating a related list.&lt;br /&gt;&lt;br /&gt;Alternatively, a Visual Basic component can have no user interface, and instead provide ActiveX objects to other programs via Component Object Model (COM). This allows for server-side processing or an add-in module.&lt;br /&gt;&lt;br /&gt;The language is garbage collected using reference counting, has a large library of utility objects, and has basic object oriented support. Since the more common components are included in the default project template, the programmer seldom needs to specify additional libraries. Unlike many other programming languages, Visual Basic is generally not case sensitive, although it will transform keywords into a standard case configuration and force the case of variable names to conform to the case of the entry within the symbol table entry. String comparisons are case sensitive by default, but can be made case insensitive if so desired.&lt;br /&gt;&lt;br /&gt;The Visual Basic compiler is shared with other Visual Studio languages (C, C++), but restrictions in the IDE do not allow the creation of some targets (Windows model DLL's) and threading models.&lt;br /&gt;&lt;br /&gt; Characteristics present in Visual Basic&lt;br /&gt;&lt;br /&gt;Visual Basic has the following uncommon traits:&lt;br /&gt;&lt;br /&gt;    * Boolean constant True has numeric value -1.[4] This is because the Boolean data type is stored as a 16-bit signed integer. In this construct -1 evaluates to 16 binary 1s (the Boolean value True), and 0 as 16 0s (the Boolean value False). This is apparent when performing a Not operation on a 16 bit signed integer value 0 which will return the integer value -1, in other words True = Not False. This inherent functionality becomes especially useful when performing logical operations on the individual bits of an integer such as And, Or, Xor and Not. This definition of True is also consistent with BASIC since the early 1970s Microsoft BASIC implementation and is also related to the characteristics of microprocessor instructions at the time.&lt;br /&gt;    * Logical and bitwise operators are unified. This is unlike all the C-derived languages (such as Java or Perl), which have separate logical and bitwise operators. This again is a traditional feature of BASIC.&lt;br /&gt;    * Variable array base. Arrays are declared by specifying the upper and lower bounds in a way similar to Pascal and Fortran. It is also possible to use the Option Base statement to set the default lower bound. Use of the Option Base statement can lead to confusion when reading Visual Basic code and is best avoided by always explicitly specifying the lower bound of the array. This lower bound is not limited to 0 or 1, because it can also be set by declaration. In this way, both the lower and upper bounds are programmable. In more subscript-limited languages, the lower bound of the array is not variable. This uncommon trait does not exist in Visual Basic .NET and VBScript.&lt;br /&gt;&lt;br /&gt;    OPTION BASE was introduced by ANSI, with the standard for ANSI Minimal BASIC in the late 1970s. The extension to using a form of DIM A(1976 TO 2020) was first introduced in BBC Basic, found on the BBC micro, which in turn was influenced by COMAL.&lt;br /&gt;&lt;br /&gt;    * Relatively strong integration with the Windows operating system and the Component Object Model.&lt;br /&gt;    * Banker's rounding as the default behavior when converting real numbers to integers.&lt;br /&gt;    * Integers are automatically promoted to reals in expressions involving the normal division operator (/) so that division of an odd integer by an even integer produces the intuitively correct result. There is a specific integer divide operator (\) which does truncate.&lt;br /&gt;    * By default, if a variable has not been declared or if no type declaration character is specified, the variable is of type Variant. However this can be changed with Deftype statements such as DefInt, DefBool, DefVar, DefObj, DefStr. There are 12 Deftype statements in total offered by Visual Basic 6.0. The default type may be overridden for a specific declaration by using a special suffix character on the variable name (# for Double, ! for Single, &amp; for Long, % for Integer, $ for String, and @ for Currency) or using the key phrase As (type). VB can also be set in a mode that only explicitly declared variables can be used with the command Option Explicit.&lt;br /&gt;&lt;br /&gt; Evolution of Visual Basic&lt;br /&gt;&lt;br /&gt;VB 1.0 was introduced in 1991. The approach for connecting the programming language to the graphical user interface is derived from a prototype developed by Alan Cooper called Tripod. Microsoft contracted with Cooper and his associates to develop Tripod into a programmable shell for Windows 3.0, under the code name Ruby (no relation to the Ruby programming language).&lt;br /&gt;&lt;br /&gt;Tripod did not include a programming language at all, and Ruby contained only a rudimentary command processor sufficient for its role as a Windows shell. Microsoft decided to use the simple Program Manager shell for Windows 3.0 instead of Ruby, and combine Ruby with the Basic language to create Visual Basic.&lt;br /&gt;&lt;br /&gt;Ruby provided the "visual" part of Visual Basic — the form designer and editing tools — along with the ability to load dynamic link libraries containing additional controls (then called "gizmos"). Ruby's extensible gizmos later became the VBX interface.&lt;br /&gt;&lt;br /&gt; Timeline of Visual Basic (VB1 to VB6)&lt;br /&gt;&lt;br /&gt;    * Project 'Thunder' was initiated&lt;br /&gt;    * Visual Basic 1.0 (May 1991) was released for Windows at the Comdex/Windows World trade show in Atlanta, Georgia.&lt;br /&gt;&lt;br /&gt;VB DOS Logo&lt;br /&gt;Visual Basic for MS-DOS&lt;br /&gt;Visual Basic for MS-DOS&lt;br /&gt;&lt;br /&gt;    * Visual Basic 1.0 for DOS was released in September 1992. The language itself was not quite compatible with Visual Basic for Windows, as it was actually the next version of Microsoft's DOS-based BASIC compilers, QuickBASIC and BASIC Professional Development System. The interface was textual, using extended ASCII characters to simulate the appearance of a GUI.&lt;br /&gt;    * Visual Basic 2.0 was released in November 1992. The programming environment was easier to use, and its speed was improved. Notably, forms became instantiable objects, thus laying the foundational concepts of class modules as were later offered in VB4.&lt;br /&gt;    * Visual Basic 3.0 was released in the summer of 1993 and came in Standard and Professional versions. VB3 included version 1.1 of the Microsoft Jet Database Engine that could read and write Jet (or Access) 1.x databases.&lt;br /&gt;    * Visual Basic 4.0 (August 1995) was the first version that could create 32-bit as well as 16-bit Windows programs. It also introduced the ability to write non-GUI classes in Visual Basic. Incompatibilities between different releases of VB4 caused installation and operation problems.&lt;br /&gt;    * With version 5.0 (February 1997), Microsoft released Visual Basic exclusively for 32-bit versions of Windows. Programmers who preferred to write 16-bit programs were able to import programs written in Visual Basic 4.0 to Visual Basic 5.0, and Visual Basic 5.0 programs can easily be converted with Visual Basic 4.0. Visual Basic 5.0 also introduced the ability to create custom user controls, as well as the ability to compile to native Windows executable code, speeding up calculation-intensive code execution.&lt;br /&gt;    * Visual Basic 6.0 (Mid 1998) improved in a number of areas, including the ability to create web-based applications. VB6 is currently scheduled to enter Microsoft's "non-supported phase" starting March 2008.&lt;br /&gt;    * Mainstream Support for Microsoft Visual Basic 6.0 ended on March 31, 2005. Extended support will end in March 2008.[5] In response, the Visual Basic user community expressed its grave concern and lobbied users to sign a petition to keep the product alive.[6] Microsoft has so far refused to change their position on the matter. Ironically, around this time, it was exposed that Microsoft's new anti-spyware offering, Microsoft AntiSpyware (part of the GIANT Company Software purchase), was coded in Visual Basic 6.0.[7] Windows Defender Beta 2 was rewritten as C++/CLI code.[8] It is difficult to tell what impact this decision will have on any future offerings of Microsoft if the perception is created that long lasting applications cannot be built with Microsoft Products due to planned obsolescence.[citation needed]&lt;br /&gt;&lt;br /&gt; Derivative languages&lt;br /&gt;&lt;br /&gt;Microsoft has developed derivatives of Visual Basic for use in scripting. It is derived heavily from BASIC and host applications, and has replaced the original Visual Basic language with a .NET platform version:&lt;br /&gt;&lt;br /&gt;    * Visual Basic for Applications (VBA) is included in many Microsoft applications (Microsoft Office), and also in many third-party products like AutoCAD, WordPerfect Office 2002 and ArcGIS. There are small inconsistencies in the way VBA is implemented in different applications, but it is largely the same language as VB6 and uses the same runtime library.&lt;br /&gt;    * VBScript is the default language for Active Server Pages and can be used in Windows scripting and client-side web page scripting. Although it resembles VB in syntax, it is a separate language and it is executed by vbscript.dll as opposed to the VB runtime. These differences can affect the performance of an ASP web site. ASP and VBScript must not be confused with ASP.NET which uses Visual Basic.NET or any other language that targets the .NET Common Language Runtime.&lt;br /&gt;    * Visual Basic .NET is Microsoft's designated successor to Visual Basic 6.0, and is part of Microsoft's .NET platform. It compiles and runs on the .NET Framework. It is not backwards compatible with VB6. An automated conversion tool exists, but for some projects automated conversion is impossible.[9]&lt;br /&gt;&lt;br /&gt; Performance and other issues&lt;br /&gt;&lt;br /&gt;Earlier counterparts of Visual Basic (prior to version 5) compiled the code to P-Code or Pseudo code only. Visual Basic 5 and 6 are able to compile the code to either native or P-Code as the programmer chooses. The P-Code is interpreted by the language runtime, also known as virtual machine, implemented for benefits such as portability and small code. However, it usually slows down the execution by adding an additional layer of interpretation of code by the runtime although small amounts of code and algorithms can be constructed to run faster than the compiled native code. Visual Basic applications require Microsoft Visual Basic runtime MSVBVMxx.DLL, where xx is the relevant version number, either 50 or 60. MSVBVM60.dll comes as standard with Windows in all editions after Windows 98 while MSVBVM50.dll comes with all editions after Windows 95. A Windows 95 machine would however require that which ever dll was needed by the program was included with the installer.&lt;br /&gt;&lt;br /&gt;Visual Basic is criticized for its poor memory management and non-standard programming constructs which is said to result in poor programming practices and inefficient outputs. When programming in Visual Basic, it can sometimes be hard to tell if a variable is a reference to an object, or is the explicit object. In the same vein, it can sometimes be difficult to tell if an operation will result in a copy of a reference to an object, or a copy of the entire object. This ambiguity could result in unexpected results or poor program performance.&lt;br /&gt;&lt;br /&gt; Sample code&lt;br /&gt;&lt;br /&gt;Here are some examples of the language:&lt;br /&gt;&lt;br /&gt;Function that returns the area of a circle:&lt;br /&gt;&lt;br /&gt;Private Function AreaOfCircle(Radius As Double) As Double&lt;br /&gt;    Const PI = 3.14159265358979323846264    (This can also be math.PI)&lt;br /&gt;    AreaOfCircle = PI * (Radius ^ 2)&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Program to display a pop-up window with the words "Hello World" on it:&lt;br /&gt;&lt;br /&gt;Sub Main()&lt;br /&gt;    MsgBox("Hello World")&lt;br /&gt;End Sub&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-5736408882691508780?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/5736408882691508780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=5736408882691508780' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/5736408882691508780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/5736408882691508780'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2007/12/visual-basic.html' title='Visual Basic'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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-7034933824878235611.post-1004264745582350453</id><published>2007-12-18T03:48:00.000-08:00</published><updated>2007-12-18T04:06:08.095-08:00</updated><title type='text'>Java programming language #2</title><content type='html'>&lt;h2&gt;&lt;span class="mw-headline"&gt;History&lt;/span&gt;&lt;/h2&gt; &lt;div class="thumb tright"&gt; &lt;div class="thumbinner" style="width: 77px;"&gt;&lt;span class="image"&gt;&lt;br /&gt;&lt;/span&gt;  &lt;div class="thumbcaption"&gt; &lt;div class="magnify" style="float: right;"&gt;&lt;span class="internal"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main articles: Java_platform#History and Java version  history&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The Java language was created by James Gosling in June 1991 for use in a set top  box project.&lt;sup class="reference" id="_ref-2"&gt;[3]&lt;/sup&gt; The language was initially called &lt;i&gt;Oak&lt;/i&gt;,  after an oak tree that stood outside Gosling's office - and also went by the  name &lt;i&gt;Green&lt;/i&gt; - and ended up later being renamed to &lt;i&gt;Java&lt;/i&gt;, from a list  of random words.&lt;sup class="reference" id="_ref-3"&gt;[4]&lt;/sup&gt; Gosling's goals were to implement a virtual machine and a  language that had a familiar C/C++ style of notation.&lt;sup class="reference" id="_ref-4"&gt;[5]&lt;/sup&gt; The first public implementation was Java 1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA), providing no-cost runtimes on popular platforms. It was fairly secure and its security was configurable, allowing network and file access to be restricted. Major web browsers soon incorporated the ability to run secure Java &lt;i&gt;applets&lt;/i&gt; within  web pages. Java became popular quickly. With the advent of &lt;i&gt;Java 2&lt;/i&gt;, new  versions had multiple configurations built for different types of platforms. For  example, &lt;i&gt;J2EE&lt;/i&gt; was for enterprise  applications and the greatly stripped down version &lt;i&gt;J2ME&lt;/i&gt; was for mobile applications. &lt;i&gt;J2SE&lt;/i&gt; was the designation for the Standard Edition. In  2006, for marketing purposes, new &lt;i&gt;J2&lt;/i&gt; versions were renamed &lt;i&gt;Java  EE&lt;/i&gt;, &lt;i&gt;Java ME&lt;/i&gt;, and &lt;i&gt;Java SE&lt;/i&gt;, respectively.&lt;/p&gt; &lt;p&gt;In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process.&lt;sup class="reference" id="_ref-5"&gt;[6]&lt;/sup&gt;&lt;sup class="reference" id="_ref-6"&gt;[7]&lt;/sup&gt;&lt;sup class="reference" id="_ref-7"&gt;[8]&lt;/sup&gt; Java remains a de facto standard that is controlled through the Java  Community Process.&lt;sup class="reference" id="_ref-8"&gt;[9]&lt;/sup&gt; At one time, Sun made most of its Java implementations available without charge although they were proprietary software. Sun's revenue from Java was generated by the selling of licenses for specialized products such as the Java Enterprise System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment (JRE) which is a subset of the SDK, the primary distinction being that in the JRE, the compiler, utility programs, and many necessary header files are not present.&lt;/p&gt; &lt;p&gt;On 13 November 2006, Sun released much of Java as free software under the terms of the GNU General Public License (GPL). On 8 May 2007 Sun finished the process, making all of Java's core code open source, aside from a small portion of code to which Sun did not hold the copyright.&lt;sup class="reference" id="_ref-9"&gt;[10]&lt;/sup&gt;&lt;/p&gt; &lt;p&gt;&lt;a id="Philosophy" name="Philosophy"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt; &lt;span class="mw-headline"&gt;Philosophy&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;a id="Primary_goals" name="Primary_goals"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Primary goals&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;There were five primary goals in the creation of the Java language:&lt;sup class="noprint Template-Fact"&gt;&lt;span title="This claim needs references to reliable sources since July 2007" style="white-space: nowrap;"&gt;[&lt;i&gt;citation needed&lt;/i&gt;]&lt;/span&gt;&lt;/sup&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;It should use the object-oriented programming  methodology.  &lt;/li&gt;&lt;li&gt;It should allow the same program to be executed on multiple operating systems.  &lt;/li&gt;&lt;li&gt;It should contain built-in support for using computer networks.  &lt;/li&gt;&lt;li&gt;It should be designed to execute code from remote sources securely.  &lt;/li&gt;&lt;li&gt;It should be easy to use by selecting what were considered the good parts of  other object-oriented languages. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&lt;a id="Platform_independence" name="Platform_independence"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Platform independence&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Java  Platform&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;One characteristic, platform independence, means that programs written in the Java language must run similarly on any supported hardware/operating-system platform. One should be able to write a program once, compile it once, and run it anywhere.&lt;/p&gt; &lt;p&gt;This is achieved by most Java compilers by compiling the Java language code  &lt;i&gt;halfway&lt;/i&gt; (to Java bytecode) – simplified machine instructions specific to the Java platform. The code is then run on a virtual machine (VM), a program written in native code on the host hardware that interprets and executes generic Java bytecode. (In some JVM versions, bytecode can also be compiled to native code, either before or during program execution, resulting in faster execution.) Further, standardized libraries are provided to allow access to features of the host machines (such as graphics, threading and networking) in unified ways. Note that, although there is an explicit compiling stage, at some point, the Java bytecode is interpreted or converted to native machine code by the JIT compiler.&lt;/p&gt; &lt;p&gt;The first implementations of the language used an interpreted virtual machine to achieve portability. These implementations produced programs that ran more slowly than programs compiled to native executables, for instance written in C or C++, so the language suffered a reputation for poor performance. More recent JVM implementations produce programs that run significantly faster than before, using multiple techniques.&lt;/p&gt; &lt;p&gt;One technique, known as &lt;i&gt;just-in-time compilation&lt;/i&gt; (JIT), translates the Java bytecode into native code at the time that the program is run, which results in a program that executes faster than interpreted code but also incurs compilation overhead during execution. More sophisticated VMs use &lt;i&gt;dynamic  recompilation&lt;/i&gt;, in which the VM can analyze the behavior of the running program and selectively recompile and optimize critical parts of the program. Dynamic recompilation can achieve optimizations superior to static compilation because the dynamic compiler can base optimizations on knowledge about the runtime environment and the set of loaded classes, and can identify the &lt;i&gt;hot  spots&lt;/i&gt; (parts of the program, often inner loops, that take up the most execution time). JIT compilation and dynamic recompilation allow Java programs to take advantage of the speed of native code without losing portability.&lt;/p&gt; &lt;p&gt;Another technique, commonly known as &lt;i&gt;static compilation&lt;/i&gt;, is to compile directly into native code like a more traditional compiler. Static Java compilers, such as GCJ, translate the Java language code to native object code, removing the intermediate bytecode stage. This achieves good performance compared to interpretation, but at the expense of portability; the output of these compilers can only be run on a single architecture. Some see avoiding the VM in this manner as defeating the point of developing in Java; however it can be useful to provide both a generic bytecode version, as well as an optimised native code version of an application.&lt;/p&gt; &lt;p&gt;&lt;a id="Implementations" name="Implementations"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Implementations&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Sun Microsystems officially licenses the Java Standard Edition platform for Microsoft Windows, Linux, and Solaris. Through a network of third-party vendors and licensees,&lt;sup class="reference" id="_ref-10"&gt;[11]&lt;/sup&gt; alternative Java environments are available for these and other platforms. To qualify as a certified Java licensee, an implementation on any particular platform must pass a rigorous suite of validation and compatibility tests. This method enables a guaranteed level of compliance and platform through a trusted set of commercial and non-commercial partners.&lt;/p&gt; &lt;p&gt;Sun's trademark license for usage of the Java brand insists that all implementations be "compatible". This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support the RMI and JNI interfaces and had added platform-specific features of their own. Sun sued and won both damages in 1997 (some $20 million) and a court order enforcing the terms of the license from Sun. As a result, Microsoft no longer ships Java with Windows, and in recent versions of Windows, Internet Explorer cannot support Java applets without a third-party plugin. However, Sun and others have made available Java run-time systems at no cost for those and other versions of Windows.&lt;/p&gt; &lt;p&gt;Platform-independent Java is essential to the Java Enterprise Edition strategy, and an even more rigorous validation is required to certify an implementation. This environment enables portable server-side applications, such as Web services, servlets, and Enterprise JavaBeans, as well as with Embedded systems based on OSGi, using Embedded Java environments. Through the new GlassFish project, Sun is working to create a fully functional, unified open-source implementation of the Java EE technologies.&lt;/p&gt; &lt;p&gt;&lt;a id="Automatic_memory_management" name="Automatic_memory_management"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Automatic memory management&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt;&lt;span class="boilerplate seealso"&gt;&lt;i&gt;See also: Garbage collection  (computer science)&lt;/i&gt;&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;One of the ideas behind Java's automatic memory management model is that programmers be spared the burden of having to perform manual memory management. In some languages the programmer allocates memory for the creation of objects stored on the heap and the responsibility of later deallocating that memory also resides with the programmer. If the programmer forgets to deallocate memory or writes code that fails to do so, a memory leak occurs and the program can consume an arbitrarily large amount of memory. Additionally, if the program attempts to deallocate the region of memory more than once, the result is undefined and the program may become unstable and may crash. Finally, in non garbage collected environments, there is a certain degree of overhead and complexity of user-code to track and finalize allocations. Often developers may box themselves into certain designs to provide reasonable assurances that memory leaks will not occur.&lt;sup class="reference" id="_ref-11"&gt;[12]&lt;/sup&gt;&lt;/p&gt; &lt;p&gt;In Java, this potential problem is avoided by automatic garbage collection. The programmer determines when objects are created, and the Java runtime is responsible for managing the object's lifecycle. The program or other objects can reference an object by holding a reference to it (which, from a low-level point of view, is its address on the heap). When no references to an object remain, the Java garbage collector automatically deletes the unreachable object, freeing memory and preventing a memory leak. Memory leaks may still occur if a programmer's code holds a reference to an object that is no longer needed—in other words, they can still occur but at higher conceptual levels.&lt;/p&gt; &lt;p&gt;The use of garbage collection in a language can also affect programming paradigms. If, for example, the developer assumes that the cost of memory allocation/recollection is low, they may choose to more freely construct objects instead of pre-initializing, holding and reusing them. With the small cost of potential performance penalties (inner-loop construction of large/complex objects), this facilitates thread-isolation (no need to synchronize as different threads work on different object instances) and data-hiding. The use of transient immutable value-objects minimizes side-effect programming.&lt;/p&gt; &lt;p&gt;Comparing Java and C++, it is possible in C++ to implement similar functionality (for example, a memory management model for specific classes can be designed in C++ to improve speed and lower memory fragmentation considerably), with the possible cost of adding comparable runtime overhead to that of Java's garbage collector, and of added development time and application complexity if one favors manual implementation over using an existing third-party library. In Java, garbage collection is built-in and virtually invisible to the developer. That is, developers may have no notion of when garbage collection will take place as it may not necessarily correlate with any actions being explicitly performed by the code they write. Depending on intended application, this can be beneficial or disadvantageous: the programmer is freed from performing low-level tasks, but at the same time loses the option of writing lower level code.&lt;/p&gt; &lt;p&gt;Java does not support pointer arithmetic as is supported in, for example, C++. This is because the garbage collector may relocate referenced objects, invalidating such pointers. Another reason that Java forbids this is that type safety and security can no longer be guaranteed if arbitrary manipulation of pointers is allowed.&lt;/p&gt; &lt;p&gt;&lt;a id="Syntax" name="Syntax"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt; &lt;span class="mw-headline"&gt;Syntax&lt;/span&gt;&lt;/h2&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Java syntax&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The syntax of Java is largely derived from C++. However, unlike C++, which combines the syntax for structured, generic, and object-oriented programming, Java was built exclusively as an object oriented language. As a result, almost everything is an object and all code is written inside a class. The exceptions are the intrinsic data types (ordinal and real numbers, boolean values, and characters), which are not classes for performance reasons.&lt;/p&gt; &lt;p&gt;This is a minimal Hello world program in Java with syntax  highlighting:&lt;/p&gt; &lt;div dir="ltr"&gt;&lt;pre class="source-java"&gt;&lt;span class="co1"&gt;// Hello.java&lt;/span&gt;&lt;br /&gt;&lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;class&lt;/span&gt; Hello &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;static&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; args&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw3"&gt;System&lt;/span&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Hello, World!"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt; &lt;p&gt;To execute a Java program, the code is saved as a file named  &lt;code&gt;Hello.java&lt;/code&gt;. It must first be compiled into bytecode using a Java compiler, which  produces a file named &lt;code&gt;Hello.class&lt;/code&gt;. This class is then  &lt;i&gt;launched&lt;/i&gt;.&lt;/p&gt; &lt;p&gt;The above example merits a bit of explanation.&lt;/p&gt; &lt;ul&gt;&lt;li&gt;All executable statements in Java are written inside a class, including  stand-alone programs.  &lt;/li&gt;&lt;li&gt;Source files are by convention named the same as the class they contain,  appending the mandatory suffix &lt;i&gt;.java&lt;/i&gt;. A &lt;code&gt;&lt;b&gt;class&lt;/b&gt;&lt;/code&gt; which  is declared &lt;code&gt;&lt;b&gt;public&lt;/b&gt;&lt;/code&gt; is required to follow this convention.  (In this case, the class &lt;code&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/code&gt; is public, therefore the  source must be stored in a file called &lt;i&gt;Hello.java&lt;/i&gt;).  &lt;/li&gt;&lt;li&gt;The compiler will generate a class file for each class defined in the source file. The name of the class file is the name of the class, with &lt;i&gt;.class&lt;/i&gt; appended. For class file generation, anonymous classes are treated as if their name was the concatenation of the name of their enclosing class, a &lt;i&gt;$&lt;/i&gt;, and  an integer.  &lt;/li&gt;&lt;li&gt;The keyword  &lt;code&gt;&lt;b&gt;public&lt;/b&gt;&lt;/code&gt; denotes that a method can be called from code in other classes, or that a class may be used by classes outside the class hierarchy. &lt;/li&gt;&lt;li&gt;The keyword &lt;code&gt;&lt;b&gt;static&lt;/b&gt;&lt;/code&gt; indicates that the method is a static method, associated  with the class rather than object instances.  &lt;/li&gt;&lt;li&gt;The keyword &lt;code&gt;&lt;b&gt;void&lt;/b&gt;&lt;/code&gt; indicates that the main method does not  return any value to the caller.  &lt;/li&gt;&lt;li&gt;The method name "&lt;code&gt;main&lt;/code&gt;" is not a keyword in the Java language. It is simply the name of the method the Java launcher calls to pass control to the program. Java classes that run in managed environments such as applets and Enterprise Java Beans do not use or need a &lt;code&gt;main()&lt;/code&gt; method.  &lt;/li&gt;&lt;li&gt;The main method must accept an array  of &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;String&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; objects. By convention, it is referenced as  &lt;code&gt;&lt;b&gt;args&lt;/b&gt;&lt;/code&gt; although any other legal identifier name can be used. Since Java 5, the main method can also use variable arguments, in the form of &lt;code&gt;public static  void main(String... args)&lt;/code&gt;, allowing the main method to be invoked with an  arbitrary number of &lt;code&gt;String&lt;/code&gt; arguments. The effect of this alternate  declaration is semantically identical (the &lt;code&gt;args&lt;/code&gt; parameter is still  an array of &lt;code&gt;String&lt;/code&gt; objects), but allows an alternate syntax for  creating and passing the array.  &lt;/li&gt;&lt;li&gt;The Java launcher launches Java by loading a given class (specified on the  command line) and starting its &lt;code&gt;public static void main(String[])&lt;/code&gt;  method. Stand-alone programs must declare this method explicitly. The  &lt;code&gt;String[] args&lt;/code&gt; parameter is an array of &lt;code&gt;&lt;span class="external text"&gt;String&lt;/span&gt;&lt;/code&gt; objects containing any arguments passed to the  class. The parameters to &lt;code&gt;main&lt;/code&gt; are often passed by means of a command line.  &lt;/li&gt;&lt;li&gt;The printing facility is part of the Java standard library: The &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;System&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; class defines a public static field called  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;out&lt;/span&gt;&lt;/code&gt;&lt;/b&gt;. The &lt;code&gt;out&lt;/code&gt; object is an instance of  the &lt;code&gt;&lt;span class="external text"&gt;PrintStream&lt;/span&gt;&lt;/code&gt; class and provides the method &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;println(String)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; for displaying data to the screen  while creating a new line (standard out). &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;An example that better demonstrates object-oriented programming:&lt;/p&gt; &lt;div dir="ltr"&gt;&lt;pre class="source-java"&gt;&lt;span class="co1"&gt;// OddEven.java&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import javax.swing.JOptionPane;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;class&lt;/span&gt; OddEven &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class="kw2"&gt;private&lt;/span&gt; &lt;span class="kw4"&gt;int&lt;/span&gt; input;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; OddEven&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; showDialog&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     input = &lt;span class="kw3"&gt;Integer&lt;/span&gt;.&lt;span class="me1"&gt;parseInt&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;JOptionPane&lt;/span&gt;.&lt;span class="me1"&gt;showInputDialog&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Please Enter A Number"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; calculate&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw1"&gt;if&lt;/span&gt; &lt;span class="br0"&gt;(&lt;/span&gt;input % &lt;span class="nu0"&gt;2&lt;/span&gt; == &lt;span class="nu0"&gt;0&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;         &lt;span class="kw3"&gt;System&lt;/span&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Even"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class="kw1"&gt;else&lt;/span&gt;&lt;br /&gt;         &lt;span class="kw3"&gt;System&lt;/span&gt;.&lt;span class="me1"&gt;out&lt;/span&gt;.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Odd"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;static&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; args&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     OddEven number = &lt;span class="kw2"&gt;new&lt;/span&gt; OddEven&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     number.&lt;span class="me1"&gt;showDialog&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     number.&lt;span class="me1"&gt;calculate&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt; &lt;ul&gt;&lt;li&gt;The &lt;b&gt;import&lt;/b&gt; statement imports the  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;JOptionPane&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; class from the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;javax.swing&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; package.  &lt;/li&gt;&lt;li&gt;The &lt;code&gt;&lt;b&gt;OddEven&lt;/b&gt;&lt;/code&gt; class declares a single &lt;code&gt;&lt;b&gt;private&lt;/b&gt;&lt;/code&gt;  field of type  &lt;code&gt;&lt;b&gt;int&lt;/b&gt;&lt;/code&gt; named &lt;code&gt;&lt;b&gt;input&lt;/b&gt;&lt;/code&gt;. Every instance of the  &lt;code&gt;OddEven&lt;/code&gt; class has its own copy of the &lt;code&gt;input&lt;/code&gt; field. The  private declaration means that no other class can access (read or write) the  &lt;code&gt;input&lt;/code&gt; field.  &lt;/li&gt;&lt;li&gt;&lt;code&gt;&lt;b&gt;OddEven()&lt;/b&gt;&lt;/code&gt; is a &lt;code&gt;&lt;b&gt;public&lt;/b&gt;&lt;/code&gt; constructor. Constructors have the same name as the enclosing class they are declared in, and unlike a method, have no return type. A constructor is used to initialize an object that is a newly created instance of the class. In this case, the constructor initializes the &lt;code&gt;input&lt;/code&gt; field to the value entered into a  &lt;code&gt;&lt;b&gt;JOptionPane&lt;/b&gt;&lt;/code&gt; input dialog. The dialog returns a  &lt;code&gt;String&lt;/code&gt; which is converted to an &lt;code&gt;int&lt;/code&gt; by the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;Integer.parseInt(String)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method.  &lt;/li&gt;&lt;li&gt;The &lt;code&gt;&lt;b&gt;calculate()&lt;/b&gt;&lt;/code&gt; method is declared without the  &lt;code&gt;static&lt;/code&gt; keyword. This means that the method is invoked using a  specific instance of the &lt;code&gt;OddEven&lt;/code&gt; class. (The reference used to invoke the  method is passed as an undeclared parameter of type &lt;code&gt;OddEven&lt;/code&gt; named  &lt;code&gt;&lt;b&gt;this&lt;/b&gt;&lt;/code&gt;.) The method tests the  expression &lt;code&gt;input % 2 == 0&lt;/code&gt; using the &lt;code&gt;&lt;b&gt;if&lt;/b&gt;&lt;/code&gt; keyword to  see if the remainder of dividing the &lt;code&gt;input&lt;/code&gt; field belonging to the  instance of the class by two is zero. If this expression is true, then it prints  &lt;b&gt;Even&lt;/b&gt;; if this expression is false it prints &lt;b&gt;Odd&lt;/b&gt;. (The  &lt;code&gt;input&lt;/code&gt; field can be equivalently accessed as  &lt;code&gt;this.input&lt;/code&gt;, which explicitly uses the undeclared &lt;code&gt;this&lt;/code&gt;  parameter.)  &lt;/li&gt;&lt;li&gt;&lt;code&gt;&lt;b&gt;OddEven number = new OddEven();&lt;/b&gt;&lt;/code&gt; declares a local object  reference variable in the  &lt;code&gt;main&lt;/code&gt; method named &lt;code&gt;number&lt;/code&gt;. This variable can hold a  reference to an object of type &lt;code&gt;OddEven&lt;/code&gt;. The declaration initializes  &lt;code&gt;number&lt;/code&gt; by first creating an instance of the &lt;code&gt;OddEven&lt;/code&gt;  class, using the &lt;code&gt;&lt;b&gt;new&lt;/b&gt;&lt;/code&gt; keyword and the  &lt;code&gt;OddEven()&lt;/code&gt; constructor, and then assigning this instance to the  variable.  &lt;/li&gt;&lt;li&gt;The statement &lt;code&gt;&lt;b&gt;number.calculate();&lt;/b&gt;&lt;/code&gt; calls the calculate  method. The instance of &lt;code&gt;OddEven&lt;/code&gt; object referenced by the  &lt;code&gt;number&lt;/code&gt; local  variable is used to invoke the method and passed as the undeclared  &lt;code&gt;this&lt;/code&gt; parameter to the &lt;code&gt;calculate&lt;/code&gt; method.  &lt;/li&gt;&lt;li&gt;For simplicity, error handling has been ignored in this example. Entering a value that is not a number will cause the program to crash. This can be avoided by catching and handling the &lt;code&gt;&lt;span class="external text"&gt;NumberFormatException&lt;/span&gt;&lt;/code&gt; thrown by  &lt;code&gt;Integer.parseInt(String)&lt;/code&gt;. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a id="Applet" name="Applet"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Applet&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Java applet&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Java applets are programs that are embedded in other applications, typically  in a Web page displayed in a Web  browser.&lt;/p&gt; &lt;div dir="ltr"&gt;&lt;pre class="source-java"&gt;&lt;span class="co1"&gt;// Hello.java&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import java.applet.Applet;&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import java.awt.Graphics;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;class&lt;/span&gt; Hello &lt;span class="kw2"&gt;extends&lt;/span&gt; &lt;span class="kw3"&gt;Applet&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; paint&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;Graphics&lt;/span&gt; gc&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     gc.&lt;span class="me1"&gt;drawString&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Hello, world!"&lt;/span&gt;, &lt;span class="nu0"&gt;65&lt;/span&gt;, &lt;span class="nu0"&gt;95&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt; &lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt; &lt;p&gt;The &lt;code&gt;&lt;b&gt;import&lt;/b&gt;&lt;/code&gt; statements direct the Java compiler to include the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;java.applet.Applet&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; and &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;java.awt.Graphics&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; classes in the compilation. The  import statement allows these classes to be referenced in the source code using the &lt;i&gt;simple  class name&lt;/i&gt; (i.e. &lt;code&gt;Applet&lt;/code&gt;) instead of the &lt;i&gt;fully qualified  class name&lt;/i&gt; (i.e. &lt;code&gt;java.applet.Applet&lt;/code&gt;).&lt;/p&gt; &lt;p&gt;The &lt;code&gt;Hello&lt;/code&gt; class &lt;code&gt;&lt;b&gt;extends&lt;/b&gt;&lt;/code&gt; (subclasses) the  &lt;code&gt;&lt;b&gt;Applet&lt;/b&gt;&lt;/code&gt; class; the &lt;code&gt;Applet&lt;/code&gt; class provides the  framework for the host application to display and control the lifecycle of the  applet. The &lt;code&gt;Applet&lt;/code&gt; class is an Abstract Windowing Toolkit (AWT)  &lt;code&gt;&lt;span class="external text"&gt;Component&lt;/span&gt;&lt;/code&gt;, which provides the applet with the capability  to display a graphical user interface (GUI) and  respond to user events.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;Hello&lt;/code&gt; class overrides the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;paint(Graphics)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method inherited from the &lt;code&gt;&lt;span class="external text"&gt;Container&lt;/span&gt;&lt;/code&gt; superclass to provide the  code to display the applet. The &lt;code&gt;paint()&lt;/code&gt; method is passed a  &lt;code&gt;&lt;b&gt;Graphics&lt;/b&gt;&lt;/code&gt; object that contains the graphic context used to  display the applet. The &lt;code&gt;paint()&lt;/code&gt; method calls the graphic context  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;drawString(String, int, int)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method to display the  &lt;b&gt;"Hello, world!"&lt;/b&gt; string at a pixel  offset of (&lt;code&gt;&lt;b&gt;65, 95&lt;/b&gt;&lt;/code&gt;) from the upper-left corner in the  applet's display.&lt;/p&gt; &lt;div dir="ltr"&gt;&lt;pre class="source-html4strict"&gt;&lt;span class="sc2"&gt;&lt;span class="coMULTI"&gt;&lt;!-- Hello.html --&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="sc2"&gt;&lt;span class="kw2"&gt;&lt;title&gt;&lt;/span&gt;&lt;/span&gt;Hello World Applet&lt;span class="sc2"&gt;&lt;span class="kw2"&gt;&lt;/title&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="sc2"&gt;&lt;span class="kw2"&gt;&lt;applet&gt;&lt;/applet&gt;&lt;/span&gt; &lt;span class="kw3"&gt;code&lt;/span&gt;=&lt;span class="st0"&gt;"Hello"&lt;/span&gt; &lt;span class="kw3"&gt;width&lt;/span&gt;=&lt;span class="st0"&gt;"200"&lt;/span&gt; &lt;span class="kw3"&gt;height&lt;/span&gt;=&lt;span class="st0"&gt;"200"&lt;/span&gt;&lt;span class="kw2"&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;An applet is placed in an HTML document  using the &lt;b&gt;&lt;code&gt;&lt;applet&gt;&lt;/applet&gt;&lt;/code&gt;&lt;/b&gt; HTML element. The &lt;code&gt;applet&lt;/code&gt; tag has  three attributes set: &lt;b&gt;&lt;code&gt;code="Hello"&lt;/code&gt;&lt;/b&gt; specifies the name of the  &lt;code&gt;Applet&lt;/code&gt; class and &lt;b&gt;&lt;code&gt;width="200" height="200"&lt;/code&gt;&lt;/b&gt; sets  the pixel width and height of the applet. Applets may also be embedded in HTML  using either the &lt;code&gt;object&lt;/code&gt; or &lt;code&gt;embed&lt;/code&gt; element,&lt;sup class="reference" id="_ref-12"&gt;[13]&lt;/sup&gt; although  support for these elements by Web browsers is inconsistent.&lt;sup class="reference" id="_ref-13"&gt;[14]&lt;/sup&gt; However, the  &lt;code&gt;applet&lt;/code&gt; tag is deprecated, so the &lt;code&gt;object&lt;/code&gt; tag is  preferred where supported.&lt;/p&gt; &lt;p&gt;The host application, typically a Web browser, instantiates the  &lt;b&gt;&lt;code&gt;Hello&lt;/code&gt;&lt;/b&gt; applet and creates an &lt;code&gt;&lt;span class="external text"&gt;AppletContext&lt;/span&gt;&lt;/code&gt; for the applet. Once the applet has  initialized itself, it is added to the AWT display hierarchy. The  &lt;code&gt;paint&lt;/code&gt; method is called by the AWT event  dispatching thread whenever the display needs the applet to draw itself.&lt;/p&gt; &lt;p&gt;&lt;a id="Servlet" name="Servlet"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;&lt;b&gt;Servlet&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Java  Servlet&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Java Servlet technology provides Web developers with a simple, consistent mechanism for extending the functionality of a Web server and for accessing existing business systems. Servlets are server-side Java EE components that generate responses (typically HTML pages) to requests (typically HTTP requests) from clients. A servlet can almost be thought of as an applet that runs on the server side—without a face.&lt;/p&gt; &lt;div dir="ltr"&gt;&lt;pre class="source-java"&gt;&lt;span class="co1"&gt;// Hello.java&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import java.io.*;&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import javax.servlet.*;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;class&lt;/span&gt; Hello &lt;span class="kw2"&gt;extends&lt;/span&gt; GenericServlet &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; service&lt;span class="br0"&gt;(&lt;/span&gt;ServletRequest request, ServletResponse response&lt;span class="br0"&gt;)&lt;/span&gt;&lt;br /&gt;         &lt;span class="kw2"&gt;throws&lt;/span&gt; ServletException, &lt;span class="kw3"&gt;IOException&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     response.&lt;span class="me1"&gt;setContentType&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"text/html"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     &lt;span class="kw2"&gt;final&lt;/span&gt; &lt;span class="kw3"&gt;PrintWriter&lt;/span&gt; pw = response.&lt;span class="me1"&gt;getWriter&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     pw.&lt;span class="me1"&gt;println&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Hello, world!"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     pw.&lt;span class="me1"&gt;close&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt; &lt;p&gt;The &lt;b&gt;&lt;code&gt;import&lt;/code&gt;&lt;/b&gt; statements direct the Java compiler to include  all of the public classes and interfaces from the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;java.io&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; and &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;javax.servlet&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; packages in the compilation.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/code&gt; class &lt;code&gt;&lt;b&gt;extends&lt;/b&gt;&lt;/code&gt; the  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;GenericServlet&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; class; the  &lt;code&gt;GenericServlet&lt;/code&gt; class provides the interface for the server to  forward requests to the servlet and control the servlet's lifecycle.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;Hello&lt;/code&gt; class overrides the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;service(ServletRequest, ServletResponse)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method  defined by the &lt;code&gt;&lt;span class="external text"&gt;Servlet&lt;/span&gt;&lt;/code&gt; interface to provide the code for the  service request handler. The &lt;code&gt;service()&lt;/code&gt; method is passed a  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;ServletRequest&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; object that contains the request from  the client and a &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;ServletResponse&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; object used to create the response  returned to the client. The &lt;code&gt;service()&lt;/code&gt; method declares that it  &lt;code&gt;&lt;b&gt;throws&lt;/b&gt;&lt;/code&gt; the exceptions &lt;code&gt;&lt;span class="external text"&gt;ServletException&lt;/span&gt;&lt;/code&gt; and &lt;code&gt;&lt;span class="external text"&gt;IOException&lt;/span&gt;&lt;/code&gt; if a problem prevents it from responding to  the request.&lt;/p&gt; &lt;p&gt;The &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;setContentType(String)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method in the response object  is called to set the MIME content type of  the returned data to &lt;b&gt;"text/html"&lt;/b&gt;. The &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;getWriter()&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method in the response returns a  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;PrintWriter&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; object that is used to write the data  that is sent to the client. The &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;println(String)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method is called to write the  &lt;b&gt;"Hello, world!"&lt;/b&gt; string to the response and then the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;close()&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method is called to close the print writer, which causes the data that has been written to the stream to be returned to the client.&lt;/p&gt; &lt;p&gt;&lt;a id="JavaServer_Page" name="JavaServer_Page"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;JavaServer Page&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: JavaServer  Pages&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;JavaServer Pages (JSPs) are server-side Java EE components that generate responses, typically HTML pages, to HTTP requests from clients. JSPs embed Java code in an HTML page by using the special delimiters &lt;code&gt;&lt;%&lt;/code&gt; and &lt;code&gt;%&gt;&lt;/code&gt;.  A JSP is compiled to a Java &lt;i&gt;servlet&lt;/i&gt;, a Java application in its own right,  the first time it is accessed. After that, the generated servlet creates the  response.&lt;/p&gt; &lt;p&gt;&lt;a id="Swing_application" name="Swing_application"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Swing application&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Swing  (Java)&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Swing is a graphical user interface library for the Java SE platform. This example Swing application creates a single window with "Hello, world!" inside:&lt;/p&gt; &lt;div dir="ltr"&gt;&lt;pre class="source-java"&gt;&lt;span class="co1"&gt;// Hello.java (Java SE 5)&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import java.awt.BorderLayout;&lt;/span&gt;&lt;br /&gt;&lt;span class="co2"&gt;import javax.swing.*;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;class&lt;/span&gt; Hello &lt;span class="kw2"&gt;extends&lt;/span&gt; &lt;span class="kw3"&gt;JFrame&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; Hello&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw2"&gt;super&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"hello"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     setDefaultCloseOperation&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;JFrame&lt;/span&gt;.&lt;span class="me1"&gt;EXIT_ON_CLOSE&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     getContentPane&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;setLayout&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw2"&gt;new&lt;/span&gt; &lt;span class="kw3"&gt;BorderLayout&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     getContentPane&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;add&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw2"&gt;new&lt;/span&gt; &lt;span class="kw3"&gt;JLabel&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="st0"&gt;"Hello, world!"&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt;     pack&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span class="kw2"&gt;public&lt;/span&gt; &lt;span class="kw2"&gt;static&lt;/span&gt; &lt;span class="kw4"&gt;void&lt;/span&gt; main&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw3"&gt;String&lt;/span&gt;&lt;span class="br0"&gt;[&lt;/span&gt;&lt;span class="br0"&gt;]&lt;/span&gt; args&lt;span class="br0"&gt;)&lt;/span&gt; &lt;span class="br0"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span class="kw2"&gt;new&lt;/span&gt; Hello&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;.&lt;span class="me1"&gt;setVisible&lt;/span&gt;&lt;span class="br0"&gt;(&lt;/span&gt;&lt;span class="kw2"&gt;true&lt;/span&gt;&lt;span class="br0"&gt;)&lt;/span&gt;;&lt;br /&gt; &lt;span class="br0"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span class="br0"&gt;}&lt;/span&gt; &lt;/pre&gt;&lt;/div&gt; &lt;p&gt;The first &lt;b&gt;&lt;code&gt;import&lt;/code&gt;&lt;/b&gt; statement directs the Java compiler to  include the &lt;code&gt;&lt;span class="external text"&gt;BorderLayout&lt;/span&gt;&lt;/code&gt; class from the &lt;code&gt;&lt;span class="external text"&gt;java.awt&lt;/span&gt;&lt;/code&gt; package in the compilation; the second  &lt;b&gt;&lt;code&gt;import&lt;/code&gt;&lt;/b&gt; includes all of the public classes and interfaces  from the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;javax.swing&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; package.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/code&gt; class &lt;code&gt;&lt;b&gt;extends&lt;/b&gt;&lt;/code&gt; the  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;JFrame&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; class; the &lt;code&gt;JFrame&lt;/code&gt; class  implements a window with a title bar and a close control.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;&lt;b&gt;Hello()&lt;/b&gt;&lt;/code&gt; constructor initializes the  frame by first calling the superclass constructor, passing the parameter  &lt;code&gt;"hello"&lt;/code&gt;, which is used as the window's title. It then calls the  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;setDefaultCloseOperation(int)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method inherited from  &lt;code&gt;JFrame&lt;/code&gt; to set the default operation when the close control on the  title bar is selected to &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;JFrame.EXIT_ON_CLOSE&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; — this causes the  &lt;code&gt;JFrame&lt;/code&gt; to be disposed of when the frame is closed (as opposed to merely hidden), which allows the JVM to exit and the program to terminate. Next, the layout of the frame is set to a &lt;code&gt;BorderLayout&lt;/code&gt;; this tells Swing  how to arrange the components that will be added to the frame. A &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;JLabel&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; is created for the string &lt;b&gt;"Hello,  world!"&lt;/b&gt; and the &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;add(Component)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method inherited from the &lt;code&gt;&lt;span class="external text"&gt;Container&lt;/span&gt;&lt;/code&gt; superclass is called to add the label to the  frame. The &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;pack()&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method inherited from the &lt;code&gt;&lt;span class="external text"&gt;Window&lt;/span&gt;&lt;/code&gt; superclass is called to size the window and lay  out its contents, in the manner indicated by the  &lt;code&gt;BorderLayout&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;The &lt;code&gt;&lt;b&gt;main()&lt;/b&gt;&lt;/code&gt; method is called by the JVM when the program  starts. It instantiates a new  &lt;b&gt;&lt;code&gt;Hello&lt;/code&gt;&lt;/b&gt; frame and causes it to be displayed by calling the  &lt;b&gt;&lt;code&gt;&lt;span class="external text"&gt;setVisible(boolean)&lt;/span&gt;&lt;/code&gt;&lt;/b&gt; method inherited from the  &lt;code&gt;&lt;span class="external text"&gt;Component&lt;/span&gt;&lt;/code&gt; superclass with the boolean parameter  &lt;code&gt;&lt;b&gt;true&lt;/b&gt;&lt;/code&gt;. Note that once the frame is displayed, exiting the  &lt;code&gt;main&lt;/code&gt; method does not cause the program to terminate because the AWT event dispatching thread remains active until all of the Swing top-level windows have been disposed.&lt;/p&gt; &lt;p&gt;&lt;a id="Criticism" name="Criticism"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt; &lt;span class="mw-headline"&gt;Criticism&lt;/span&gt;&lt;/h2&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Criticism of  Java&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;&lt;a id="Performance" name="Performance"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Performance&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Java  performance&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Java's performance has increased substantially since the early versions, and performance of JIT compilers relative to native compilers has in some tests been shown to be quite similar.&lt;sup class="reference" id="_ref-14"&gt;[15]&lt;/sup&gt;&lt;sup class="reference" id="_ref-15"&gt;[16]&lt;/sup&gt;&lt;sup class="reference" id="_ref-16"&gt;[17]&lt;/sup&gt; The performance of the compilers does not necessarily indicate the performance of the compiled code; only careful testing can reveal the true performance issues in any system.&lt;/p&gt; &lt;p&gt;In a paper written in 1999 by Lutz Prechelt it is outlined that, statistically, programmer efficiency and experience has a bearing many standard deviations greater on run-time and memory usage than language choice. This paper specifically uses Java as a basis for the comparison, due to its then bad reputation.&lt;sup class="reference" id="_ref-17"&gt;[18]&lt;/sup&gt;&lt;/p&gt; &lt;p&gt;&lt;a id="Look_and_feel" name="Look_and_feel"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Look and feel&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;The default look and feel of GUI applications written in Java using the Swing toolkit is very different from native applications. It is possible to specify a different look and feel through the pluggable look and feel system of Swing. Clones of Windows, GTK and Motif are supplied by Sun. Apple also provides an Aqua look and feel for Mac OS X. Though prior implementations of these look and feels have been considered lacking, Swing in Java SE 6 addresses this problem by using more native widget drawing routines of the underlying platforms. Alternatively, third party toolkits such as wx4j or SWT may be used for increased integration with the native windowing system.&lt;/p&gt; &lt;p&gt;&lt;a id="Object_orientation_caveat" name="Object_orientation_caveat"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Object orientation caveat&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;As in C++ and some other object-oriented languages, variables of Java's primitive types are not objects. Values of primitive types are either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap, as is the common case for objects (but see Escape analysis). This was a conscious decision by Java's designers for performance reasons. Because of this, Java is not considered to be a pure object-oriented programming language. However, as of Java 5.0, autoboxing enables programmers to write as if primitive types are their wrapper classes, with their object-oriented counterparts representing classes of their own, and freely interchange between them for improved flexibility.&lt;/p&gt; &lt;p&gt;&lt;a id="Lack_of_features" name="Lack_of_features"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Lack of features&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Unlike C++, Java suppresses several features (such as operator overloading and multiple inheritance), in order to simplify the language, and to "save the programmers from themselves", to prevent possible errors and anti-pattern design. This has been a source of criticism, relating to a lack of low-level features and some of these may be worked around.&lt;/p&gt; &lt;p&gt;&lt;a id="Communications_API" name="Communications_API"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Communications API&lt;/span&gt;&lt;/h3&gt; &lt;p&gt;Java does not have official or good support for cross-platform environment Communications API like USB, Bluetooth, RS-232 hardware (serial ports) and limited access to IEEE-1284 (parallel ports), SPP mode.&lt;sup class="reference" id="_ref-18"&gt;[19]&lt;/sup&gt;&lt;sup class="reference" id="_ref-19"&gt;[20]&lt;/sup&gt;&lt;/p&gt; &lt;p&gt;&lt;a id="Resources" name="Resources"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt; &lt;span class="mw-headline"&gt;Resources&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;a id="Java_Runtime_Environment" name="Java_Runtime_Environment"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;Java Runtime Environment&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt; &lt;div class="noprint relarticle mainarticle"&gt;&lt;i&gt;Main article: Java  Runtime Environment&lt;/i&gt;&lt;/div&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The Java Runtime Environment, or &lt;i&gt;JRE&lt;/i&gt;, is the software required to run any application deployed on the Java Platform. End-users commonly use a JRE in software packages and Web browser plugins. Sun also distributes a superset of the JRE called the Java 2 SDK (more commonly known as the JDK), which includes development tools such as the Java compiler, Javadoc, Jar and debugger.&lt;/p&gt; &lt;p&gt;One of the unique advantages of the concept of a runtime engine is that errors (exceptions) should not 'crash' the system. Moreover, in runtime engine environments such as Java there exist tools that attach to the runtime engine and every time that an exception of interest occurs they record debugging information that existed in memory at the time the exception was thrown (stack and heap values). These Automated Exception Handling tools provide 'root-cause' information for exceptions in Java programs that run in production, testing or development environments.&lt;/p&gt; &lt;p&gt;&lt;a id="Components" name="Components"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h4&gt; &lt;span class="mw-headline"&gt;Components&lt;/span&gt;&lt;/h4&gt; &lt;ul&gt;&lt;li&gt;Java libraries are the compiled byte codes of source code developed by the JRE implementor to support application development in Java. Examples of these libraries are: &lt;ul&gt;&lt;li&gt;The core libraries, which include:  &lt;ul&gt;&lt;li&gt;Collection libraries which implement data structures such as lists, dictionaries, trees and sets  &lt;/li&gt;&lt;li&gt;XML Processing (Parsing, Transforming,  Validating) libraries  &lt;/li&gt;&lt;li&gt;Security  &lt;/li&gt;&lt;li&gt;Internationalization and localization  libraries &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;The integration libraries, which allow the application writer to communicate  with external systems. These libraries include:  &lt;ul&gt;&lt;li&gt;The Java Database Connectivity (JDBC) API for database access  &lt;/li&gt;&lt;li&gt;Java Naming and Directory  Interface (JNDI) for lookup and discovery  &lt;/li&gt;&lt;li&gt;RMI and CORBA for distributed application development &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;User Interface  libraries, which include:  &lt;ul&gt;&lt;li&gt;The (heavyweight, or native) Abstract Windowing Toolkit (AWT), which provides GUI components, the means for laying out those components and the means for handling events from those components &lt;/li&gt;&lt;li&gt;The (lightweight) Swing libraries, which are built on AWT but  provide (non-native) implementations of the AWT widgetry  &lt;/li&gt;&lt;li&gt;APIs for audio capture, processing, and playback &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li&gt;A platform dependent implementation of Java virtual machine (JVM) which is the means by which the byte codes of the Java libraries and third party applications are executed &lt;/li&gt;&lt;li&gt;Plugins, which enable applets to be run in Web browsers  &lt;/li&gt;&lt;li&gt;Java Web Start,  which allows Java applications to be efficiently distributed to end users across the Internet  &lt;/li&gt;&lt;li&gt;Licensing and documentation &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a id="APIs" name="APIs"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h3&gt; &lt;span class="mw-headline"&gt;APIs&lt;/span&gt;&lt;/h3&gt; &lt;dl&gt;&lt;dd&gt;&lt;span class="boilerplate seealso"&gt;&lt;i&gt;See also: Free Java  implementations#Class library&lt;/i&gt;&lt;/span&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Sun has defined three platforms targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;Java Platform, Micro Edition  (Java ME) — targeting environments with limited resources,  &lt;/li&gt;&lt;li&gt;Java Platform, Standard  Edition (Java SE) — targeting workstation environments, and  &lt;/li&gt;&lt;li&gt;Java Platform, Enterprise  Edition (Java EE) — targeting large distributed enterprise or Internet  environments. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The classes in the Java APIs are organized into separate groups called packages. Each package contains a set of related interfaces, classes and exceptions. Refer to the separate platforms for a description of the packages available.&lt;/p&gt; &lt;p&gt;The set of APIs is controlled by Sun Microsystems in cooperation with others through the Java Community Process program. Companies or individuals participating in this process can influence the design and development of the APIs. This process has been a subject of controversy.&lt;/p&gt; &lt;p&gt;&lt;a id="See_also" name="See_also"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt; &lt;span class="mw-headline"&gt;See also&lt;/span&gt;&lt;/h2&gt; &lt;ul&gt;&lt;li&gt;C to Java Virtual Machine  compilers  &lt;/li&gt;&lt;li&gt;Comparison of programming  languages  &lt;/li&gt;&lt;li&gt;Groovy (programming language)  - an alternative language for the Java platform  &lt;/li&gt;&lt;li&gt;Join Java  &lt;/li&gt;&lt;li&gt;JavaOne  &lt;/li&gt;&lt;li&gt;JavaOS  &lt;/li&gt;&lt;li&gt;Javapedia  &lt;/li&gt;&lt;li&gt;List of integrated  development environments for Java  &lt;/li&gt;&lt;li&gt;List of Java virtual machines  &lt;/li&gt;&lt;li&gt;List of Java  APIs  &lt;/li&gt;&lt;li&gt;List of Java scripting  languages  &lt;/li&gt;&lt;li&gt;Java Posse  &lt;/li&gt;&lt;li&gt;Java  version history  &lt;/li&gt;&lt;li&gt;OpenJDK  &lt;/li&gt;&lt;li&gt;Swing (Java)  &lt;/li&gt;&lt;li&gt;C# Language &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a id="Notes" name="Notes"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt; &lt;span class="mw-headline"&gt;Notes&lt;/span&gt;&lt;/h2&gt; &lt;div class="references-small"&gt; &lt;ol class="references"&gt;&lt;li id="_note-0"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;The Java Language  Environment&lt;/span&gt; (May 1996).  &lt;/li&gt;&lt;li id="_note-1"&gt;&lt;b&gt;^&lt;/b&gt; Java 5.0 added several new language features (the enhanced for loop, autoboxing, varargs and annotations), after they were introduced in the similar (and competing) C# language. &lt;span class="external autonumber"&gt;[1]&lt;/span&gt;&lt;span class="external autonumber"&gt;[2]&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-2"&gt;&lt;b&gt;^&lt;/b&gt; Jon Byous, &lt;span class="external text"&gt;&lt;i&gt;Java  technology: The early years&lt;/i&gt;&lt;/span&gt;. Sun Developer Network, no date [ca. 1998].  Retrieved April 22, 2005.  &lt;/li&gt;&lt;li id="_note-3"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external free"&gt;http://blogs.sun.com/jonathan/entry/better_is_always_different&lt;/span&gt;.   &lt;/li&gt;&lt;li id="_note-4"&gt;&lt;b&gt;^&lt;/b&gt; Heinz Kabutz, &lt;span class="external text"&gt;&lt;i&gt;Once Upon an Oak&lt;/i&gt;&lt;/span&gt;. Artima, Retrieved April 29, 2007.  &lt;/li&gt;&lt;li id="_note-5"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;Java Study Group&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-6"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;Why Java™ Was - Not - Standardized Twice&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-7"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;What is ECMA--and why Microsoft cares&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-8"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;Java Community Process website&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-9"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external free"&gt;http://open.itworld.com/4915/070508opsjava/page_1.html&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-10"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external free"&gt;http://java.sun.com/javase/licensees.jsp&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-11"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external free"&gt;http://www.research.att.com/~bs/bs_faq2.html#memory-leaks&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-12"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external free"&gt;http://java.sun.com/docs/books/tutorial/deployment/applet/applettag.html&lt;/span&gt;   &lt;/li&gt;&lt;li id="_note-13"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external free"&gt;http://java.sun.com/docs/books/tutorial/deployment/applet/mixedbrowser.html&lt;/span&gt;   &lt;/li&gt;&lt;li id="_note-14"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;Performance of Java versus C++&lt;/span&gt;, J.P.Lewis and Ulrich Neumann,  Computer Graphics and Immersive Technology Lab, University of Southern  California  &lt;/li&gt;&lt;li id="_note-15"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;The Java is Faster than C++  and C++ Sucks Unbiased Benchmark&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-16"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;FreeTTS - A Performance Case Study&lt;/span&gt;, Willie Walker, Paul Lamere,  Philip Kwok  &lt;/li&gt;&lt;li id="_note-17"&gt;&lt;b&gt;^&lt;/b&gt; Lutz Prechelt. Technical opinion: comparing Java vs. C/C++ efficiency differences to interpersonal differences. Communications of the ACM, Vol 42, #10, 1999 &lt;/li&gt;&lt;li id="_note-18"&gt;&lt;b&gt;^&lt;/b&gt; &lt;span class="external text"&gt;The Java  Communications 3.0 API for available for Solaris SPARC, Solaris x86, and Linux  x86&lt;/span&gt;  &lt;/li&gt;&lt;li id="_note-19"&gt;&lt;b&gt;^&lt;/b&gt; Java and USB article on  whether or not Java should officially support the USB by by Jeff Friesen  07/06/2006 &lt;span class="external autonumber"&gt;[3]&lt;/span&gt; &lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-1004264745582350453?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/1004264745582350453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=1004264745582350453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/1004264745582350453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/1004264745582350453'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2007/12/java-programming-language-2.html' title='Java programming language #2'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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-7034933824878235611.post-8833348879487608468</id><published>2007-12-18T03:35:00.000-08:00</published><updated>2007-12-18T03:48:50.875-08:00</updated><title type='text'>Java programming language</title><content type='html'>&lt;p&gt;&lt;b&gt;Java&lt;/b&gt; is a programming language originally developed  by Sun  Microsystems and released in 1995 as a core component of Sun's Java platform. The language  derives much of its syntax from C  and C++ but has a simpler object model and fewer  low-level facilities. Java applications are typically compiled to bytecode which can run on any Java virtual machine (JVM)  regardless of computer architecture.&lt;/p&gt; &lt;p&gt;The original and reference implementation Java compilers, virtual machines, and class  libraries were developed by Sun from 1995. As of May 2007, in compliance  with the specifications of the Java Community Process, Sun made  available most of their Java technologies as free software under the GNU  General Public License. Others have also developed alternative  implementations of these Sun technologies, such as the GNU Compiler  for Java and GNU  Classpath.&lt;/p&gt; &lt;p&gt;Java's design, industry backing and portability have made Java one of the  fastest-growing and most widely used programming languages in the modern  computing industry&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-8833348879487608468?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/8833348879487608468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=8833348879487608468' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/8833348879487608468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/8833348879487608468'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2007/12/java-programming-language.html' title='Java programming language'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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-7034933824878235611.post-7224655590555386082</id><published>2007-07-12T07:48:00.000-07:00</published><updated>2007-07-12T08:10:23.126-07:00</updated><title type='text'>Introduction to Programming</title><content type='html'>&lt;a href="http://bp3.blogger.com/_genfx3edw2U/RpZERv7JnZI/AAAAAAAAAA4/WWo-C1NUma4/s1600-h/programming_1.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5086327900874579346" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; CURSOR: hand" alt="" src="http://bp3.blogger.com/_genfx3edw2U/RpZERv7JnZI/AAAAAAAAAA4/WWo-C1NUma4/s320/programming_1.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The commands in a program are pretty useless unless they have some data to act on so programmers either give the programs some data to work with (list of names or numbers for example) or they make the program generate it’s own data. Sometimes, the data comes from an outside source like the Internet or the computer that the program runs on. The data that a program receives is called input and data that the program generates is called output.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Other times, the data is unknown. If the program were working with a simple algebra equation like, “x + 5 = y,” the variables “x” and “y” would be unknown pieces of data. Or if a program were to calculate a date “x” days from now, the variable “x” would be an unknown piece of data until we tell the program what “x” is. In programming, it’s sometimes required to work with unknown pieces of data.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;That’s when conditions come in handy. Conditions allow a program to perform an action based on the outcome of a previous command.3 Using this type of instruction, we could instruct a program to do one thing if the “x” variable in our latter example turned out to be 7 days, and then do different thing if the variable turned out to be 3 days.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Commands, data, variables, and conditions help build the most simple programs and there are certainly many more components of any programming language. But when they’re typed into a programming language and compiled to create a an executable file (a file ending with the .exe extension), they turn into a software application.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;As we mentioned earlier, you can use a programming language to control your computer. By using simple commands, you can program your computer to perform mathematical tasks, fill out web forms, compose an email message and send it off, or any number of other things. If you’re interested, you may find Visual Basic is one of the most easiest programming languages to learn. Visual Basic is an object-oriented programming language and it automatically codes much of a program the minute a programmer drags a button onto a screen.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7034933824878235611-7224655590555386082?l=aeprogramming.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://aeprogramming.blogspot.com/feeds/7224655590555386082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7034933824878235611&amp;postID=7224655590555386082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/7224655590555386082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7034933824878235611/posts/default/7224655590555386082'/><link rel='alternate' type='text/html' href='http://aeprogramming.blogspot.com/2007/07/introduction-to-programming.html' title='Introduction to Programming'/><author><name>AER</name><uri>http://www.blogger.com/profile/16931922639585787404</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_genfx3edw2U/RpZERv7JnZI/AAAAAAAAAA4/WWo-C1NUma4/s72-c/programming_1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
