<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-161023561022306036</id><updated>2024-10-24T22:45:02.929-07:00</updated><title type='text'>JAVA</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://java89.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-8508052772935085390</id><published>2008-10-07T11:35:00.000-07:00</published><updated>2008-10-07T11:43:14.369-07:00</updated><title type='text'>MAINFRAME COMPUTER</title><content type='html'>Mainframes (often colloquially referred to as Big Iron are computers used mainly by large organizations for critical applications, typically bulk data processing such as census, industry and consumer statistics, ERP, and financial transaction processing.&lt;br /&gt;&lt;br /&gt;The term probably originated from the early mainframes, as they were housed in enormous, room-sized metal boxes or frames. Later the term was used to distinguish high-end commercial machines from less powerful units.&lt;br /&gt;&lt;br /&gt;Today in practice, the term usually refers to computers compatible with the IBM System/360 line, first introduced in 1965. (IBM System z10 is the latest incarnation.) Otherwise, large systems that are not based on the System/360 are referred to as either &quot;servers&quot; or &quot;supercomputers&quot;. However, &quot;server&quot;, &quot;supercomputer&quot; and &quot;mainframe&quot; are not synonymous (see client-server).&lt;br /&gt;&lt;br /&gt;Some non-System/360-compatible systems derived from or compatible with older (pre-Web) server technology may also be considered mainframes. These include the Burroughs large systems, the UNIVAC 1100/2200 series systems, and the pre-System/360 IBM 700/7000 series. Most large-scale computer system architectures were firmly established in the 1960s and most large computers were based on architecture established during that era up until the advent of Web servers in the 1990s. (Interestingly, the first Web server running anywhere outside Switzerland ran on an IBM mainframe at Stanford University as early as 1990. See History of the World Wide Web for details.)&lt;br /&gt;&lt;br /&gt;There were several minicomputer operating systems and architectures that arose in the 1970s and 1980s, but minicomputers are generally not considered mainframes. (UNIX arose as a minicomputer operating system; Unix has scaled up over the years to acquire some mainframe characteristics.)&lt;br /&gt;&lt;br /&gt;Many defining characteristics of &quot;mainframe&quot; were established in the 1960s, but those characteristics continue to expand and evolve to the present day&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Modern mainframe computers have abilities not so much defined by their single task computational speed (usually defined as MIPS — Millions of Instructions Per Second) as by their redundant internal engineering and resulting high reliability and security, extensive input-output facilities, strict backward compatibility with older software, and high utilization rates to support massive throughput. These machines often run for years without interruption, with repairs and hardware upgrades taking place during normal operation.&lt;br /&gt;&lt;br /&gt;Software upgrades are only non-disruptive when Parallel Sysplex is in place, with true workload sharing, so one system can take over another&#39;s application, while it is being refreshed. More recently, there are several IBM mainframe installations that have delivered over a decade of continuous business service as of 2007, with hardware upgrades not interrupting service.[citation needed] Mainframes are defined by high availability, one of the main reasons for their longevity, because they are typically used in applications where downtime would be costly or catastrophic. The term Reliability, Availability and Serviceability (RAS) is a defining characteristic of mainframe computers. Proper planning (and implementation) is required to exploit these features.&lt;br /&gt;&lt;br /&gt;In the 1960s, most mainframes had no interactive interface. They accepted sets of punch cards, paper tape, and/or magnetic tape and operated solely in batch mode to support back office functions, such as customer billing. Teletype devices were also common, at least for system operators. By the early 1970s, many mainframes acquired interactive user interfaces and operated as timesharing computers, supporting hundreds or thousands of users simultaneously along with batch processing. Users gained access through specialized terminals or, later, from personal computers equipped with terminal emulation software. Many mainframes supported graphical terminals (and terminal emulation) by the 1980s (if not earlier). Nowadays most mainframes have partially or entirely phased out classic terminal access for end-users in favor of Web user interfaces. Developers and operational staff typically continue to use terminals or terminal emulators.&lt;br /&gt;&lt;br /&gt;Historically mainframes acquired their name in part because of their substantial size and requirements for specialized heating, ventilating, air conditioning (HVAC), and electrical power. Those requirements ended by the mid-1990s with CMOS mainframe designs replacing the older bipolar technology. In a major reversal, IBM now touts its newer mainframes&#39; ability to reduce data center energy costs for power and cooling and reduced physical space requirements compared to server farms.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Characteristics of mainframes&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Nearly all mainframes have the ability to run (or host) multiple operating systems and thereby operate not as a single computer but as a number of virtual machines. In this role, a single mainframe can replace dozens or even hundreds of smaller servers. While mainframes pioneered this capability, it is now available on most families of computer system.&lt;br /&gt;&lt;br /&gt;Mainframes can add or hot swap system capacity non disruptively and granularly. Modern mainframes, notably the IBM zSeries, System z9 and System z10 servers, offer three levels of virtualization: logical partitions (LPARs, via the PR/SM facility), virtual machines (via the z/VM operating system), and through its operating systems (notably z/OS with its key-protected address spaces and sophisticated goal-oriented workload scheduling,[clarify] but also Linux, OpenSolaris (being ported) and Java). This virtualization is so thorough, so well established, and so reliable that most IBM mainframe customers run no more than two machines: one in their primary data center, and one in their backup data center—fully active, partially active, or on standby—in case there is a catastrophe affecting the first building. All test, development, training, and production workload for all applications and all databases can run on a single machine, except for extremely large demands where the capacity of one machine might be limiting. Such a two mainframe installation can support continuous business service, avoiding both planned and unplanned outages.&lt;br /&gt;&lt;br /&gt;Mainframes are designed to handle very high volume input and output (I/O) and emphasize throughput computing. Since the mid-1960s, mainframe designs have included several subsidiary computers (called channels or peripheral processors) which manage the I/O devices, leaving the CPU free to deal only with high-speed memory. It is common in mainframe shops to deal with massive databases and files. Giga-record or tera-record files are not unusual.[4] Compared to a typical PC, mainframes commonly have hundreds to thousands of times as much data storage online, and can access it much faster.[citation needed] &lt;br /&gt;&lt;br /&gt;Mainframe return on investment (ROI), like any other computing platform, is dependent on its ability to scale, support mixed workloads, reduce labor costs, deliver uninterrupted service for critical business applications, and several other risk-adjusted cost factors. Some argue that the modern mainframe is not cost-effective. Hewlett-Packard and Dell unsurprisingly take that view at least at times, and so do some independent analysts. Sun Microsystems also takes that view, but beginning in 2007 promoted a partnership with IBM which largely focused on IBM support for Solaris on its System x and BladeCenter products, but also included positive comments for the company&#39;s OpenSolaris operating system being ported to IBM mainframes. The general consensus (held by Gartner[citation needed] and other independent analysts) is that the modern mainframe often has unique value and superior cost-effectiveness, especially for large scale enterprise computing. In fact, Hewlett-Packard also continues to manufacture its own mainframe (arguably), the NonStop system originally created by Tandem. Logical partitioning is now found in many UNIX-based servers, and many vendors are promoting virtualization technologies, in many ways validating the mainframe&#39;s design accomplishments while blurring the differences between the different approaches to enterprise computing.&lt;br /&gt;&lt;br /&gt;Mainframes also have execution integrity characteristics for fault tolerant computing. z900 and z990 and System z9 and z10 servers execute each instruction twice,[citation needed] compare results, and shift workloads &quot;in flight&quot; to functioning processors, including spares, without any impact to applications or users. This feature, also found in HP&#39;s NonStop systems, is known as lock-stepping, because both processors take their &quot;steps&quot; (i.e. instructions) together. Not all applications absolutely need the assured integrity that these systems provide, but many do, such as financial transaction processing.&lt;br /&gt;&lt;br /&gt;However, the mainframe has its disadvantage. In particular, it is most likely remote and centralized. That may not be a problem as some business has to be done centralized, e.g. accounting, stock transaction, etc. However, there are a lot of business processes that benefit from decentralized management. Also, the high costs to maintain in an absolute scale or, to put it nicer, the need of a critical mass to invest on a mainframe platform sometimes &quot;force&quot; processes that are relatively independent to compromise and sit in one large box under the centralized IT management. Even though one may argue certain cost saving on average, the flexibility, the user ownership, the difficulty to compromise the maintenance window, the hardship to deal with diverse clients, and also delegating IT management to a different team makes mainframe concept unpopular. A lot of IT revolution is away from the &quot;bureau approach&quot; implicit to mainframe solution. Instead, one opts for a more personal (PC), or departmental (mid-range), data processing. Mainframe&#39;s virtualization technology of running hundreds of OSes (like Linux) on one mainframe did not directly address these issues inherent to centralization. Instead, a lot of the mainframe&#39;s features, like multiprocessing, disk array controllers, I/O multipathing, graphics controllers, virtualization, are downscaled to less expensive platforms, rather than lower platform&#39;s technologies upscale to mainframe.&lt;br /&gt;&lt;br /&gt;Despite these issues, the mainframe is still a viable general purpose business computer in terms of its support for a wide variety of popular operating systems, middleware, and applications suitable for certain type of organization, culture and business processes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt; Market&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;IBM mainframes dominate the mainframe market at well over 90% market share. Unisys manufactures ClearPath mainframes, based on earlier Sperry and Burroughs product lines. Hitachi co-developed the zSeries z800 with IBM to share expenses. Hewlett-Packard sells its unique NonStop systems, which it acquired with Tandem Computers. Groupe Bull&#39;s DPS, Fujitsu-Siemens BS2000, and Fujitsu-ICL VME mainframes are still available in Europe. Fujitsu, Hitachi, and NEC (the &quot;JCMs&quot;) still maintain nominal mainframe hardware businesses in their home Japanese market.&lt;br /&gt;&lt;br /&gt;The amount of vendor investment in mainframe development varies with market share. Unisys, HP, Groupe Bull, Fujitsu, Hitachi, and NEC now rely primarily on commodity Intel CPUs rather than custom processors in order to reduce development expenses, and they have also cut back their mainframe software development. In contrast, IBM has its own large research and development organization designing new, homegrown CPUs, including mainframe processors, and IBM is rapidly expanding its software business, including its mainframe software portfolio, to seek additional profits.&lt;br /&gt;&lt;br /&gt;Platform Solutions Inc., which was spun off former plug compatible mainframe vendor Amdahl Corp. in January 1999,[8] markets Itanium-based servers compatible with IBM System z. PSI and IBM are engaged in a series of lawsuits. IBM alleges that PSI violated its patents and refuses to license its software on PSI systems, while PSI alleges that IBM is violating anti-trust laws. In October of 2007, PSI has additionally filed a complaint with the EU concerning IBM anti-competitive behavior in the European mainframe market.[9] In July 2008 IBM acquired PSI and both companies dropped their lawsuits against each other.[10] The European Union, however, has not stated it has dropped its investigation.[citation needed]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;several manufacturers produced mainframe computers from the late 1950s through the 1970s. The group of manufacturers was first known as &quot;IBM and the Seven Dwarfs&quot;: IBM, Burroughs, UNIVAC, NCR, Control Data, Honeywell, General Electric and RCA. Later, shrinking, it was referred to as IBM and the BUNCH. IBM&#39;s dominance grew out of their 700/7000 series and, later, the development of the 360 series mainframes. The latter architecture has continued to evolve into their current zSeries/z9 mainframes which, along with the then Burroughs and now Unisys MCP-based mainframes, are among the few mainframe architectures still extant that can trace their roots to this early period. That said, while they can still run 24-bit System/360 code, the 64-bit zSeries and System z9 CMOS servers have nothing physically in common with the older systems. Notable manufacturers outside the USA were Siemens and Telefunken in Germany, ICL in the United Kingdom, and Fujitsu, Hitachi, Oki, and NEC in Japan. The Soviet Union and Warsaw Pact countries manufactured close copies of IBM mainframes during the Cold War; the Strela is an example of an independently designed Soviet computer.&lt;br /&gt;&lt;br /&gt;Shrinking demand and tough competition caused a shakeout in the market in the early 1980s — RCA sold out to UNIVAC and GE also left; Honeywell was bought out by Bull; UNIVAC became a division of Sperry, which later merged with Burroughs to form Unisys Corporation in 1986. In 1991, AT&amp;T briefly owned NCR. During the same period, companies found that servers based on microcomputer designs could be deployed at a fraction of the acquisition price and offer local users much greater control over their own systems given the IT policies and practices at that time. Terminals used for interacting with mainframe systems were gradually replaced by personal computers. Consequently, demand plummeted and new mainframe installations were restricted mainly to financial services and government. In the early 1990s, there was a consensus among industry analysts that the mainframe was a dying market as mainframe platforms were increasingly replaced by personal computer networks.&lt;br /&gt;&lt;br /&gt;That trend started to turn around in the late 1990s as corporations found new uses for their existing mainframes and as the price of data networking collapsed in most parts of the world. The growth of e-business also dramatically increased the number of back-end transactions processed by mainframe software as well as the size and throughput of databases. Another factor currently increasing mainframe use is the development of the Linux operating system, which can run on many mainframe systems, typically in virtual machines. Linux allows users to take advantage of open source software combined with mainframe hardware RAS. Rapid expansion and development in emerging markets, particularly China, is also spurring major mainframe investments to solve exceptionally difficult computing problems, e.g. providing unified, extremely high volume online transaction processing databases for 1 billion consumers across multiple industries (banking, insurance, credit reporting, government services, etc.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Mainframes vs. supercomputers&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The distinction between supercomputers and mainframes is not a hard and fast one, but supercomputers generally focus on problems which are limited by calculation speed while mainframes focus on problems which are limited by input/output and reliability (&quot;throughput computing&quot;) and on solving multiple business problems concurrently (mixed workload). The differences and similarities include:&lt;br /&gt;&lt;br /&gt;Both types of systems offer parallel processing. Supercomputers typically expose it to the programmer in complex manners, while mainframes typically use it to run multiple tasks. One result of this difference is that adding processors to a mainframe often speeds up the entire workload transparently. &lt;br /&gt;Supercomputers are optimized for complicated computations that take place largely in memory, while mainframes are optimized for comparatively simple computations involving huge amounts of external data. For example, weather forecasting is suited to supercomputers, and insurance business or payroll processing applications are more suited to mainframes. &lt;br /&gt;Supercomputers are often purpose-built for one or a very few specific institutional tasks (e.g. simulation and modeling). Mainframes typically handle a wider variety of tasks (e.g. data processing, warehousing). Consequently, most supercomputers can be one-off designs, whereas mainframes typically form part of a manufacturer&#39;s standard model lineup. &lt;br /&gt;Mainframes tend to have numerous ancillary service processors assisting their main central processors (for cryptographic support, I/O handling, monitoring, memory handling, etc.) so that the actual &quot;processor count&quot; is much higher than would otherwise be obvious. Supercomputer design tends not to include as many service processors since they don&#39;t appreciably add to raw number-crunching power. &lt;br /&gt;There has been some blurring of the term &quot;mainframe,&quot; with some PC and server vendors referring to their systems as &quot;mainframes&quot; or &quot;mainframe-like.&quot; This is not widely accepted and the market generally recognizes that mainframes are genuinely and demonstrably different&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Speed and performance&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The CPU speed of mainframes has historically been measured in millions of instructions per second (MIPS). MIPS have been used as an oversimplified comparative rating of the speed and capacity of mainframes. The smallest System z9 IBM mainframes today run at about 26 MIPS and the largest System z10 at about 30,657 MIPS — a 1 to 1179 performance capacity ratio. IBM&#39;s Parallel Sysplex technology can join up to 32 of these systems, making them behave like a single, logical computing facility of as much as about 981,024 MIPS.&lt;br /&gt;&lt;br /&gt;The MIPS measurement has long been known to be misleading and has often been parodied as &quot;Meaningless Indicator of Processor Speed.&quot; The complex CPU architectures of modern mainframes have reduced the relevance of MIPS ratings to the actual number of instructions executed. Likewise, the modern &quot;balanced performance&quot; system designs focus both on CPU power and on I/O capacity, and virtualization capabilities make comparative measurements even more difficult. See benchmark (computing) for a brief discussion of the difficulties in benchmarking such systems. IBM has long published a set of LSPR (Large System Performance Reference) ratio tables for mainframes that take into account different types of workloads and are a more representative measurement of several categories of mainframe workloads. However, these comparisons are not available for non-IBM systems and cannot be directly used for cross-platform comparisons. It takes a fair amount of work (and maybe guesswork) for users to determine what type of workload they have and then apply only the LSPR values most relevant to them. Also, IBM does not measure all workloads on all possible configurations, so some estimates are inaccurate. Current processors can have up to 64 CPU&#39;s, but LSPR has not measured any over 32 for a single OS instance, instead partitioning the box into multiple z/OS instances in LSPR tables with 56 and 64-CPU systems.&lt;br /&gt;&lt;br /&gt;To give some idea of real world experience, a single mainframe may execute the equivalent of 1, 5, 50, 100, or even more distributed processors&#39; worth of business activity, however this is highly dependent on the workload. Merely counting processors to compare server platforms is extremely perilous</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/8508052772935085390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/8508052772935085390' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8508052772935085390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8508052772935085390'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/mainframe-computer.html' title='MAINFRAME COMPUTER'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-6594800282919960619</id><published>2008-10-07T11:28:00.000-07:00</published><updated>2008-10-07T11:35:30.655-07:00</updated><title type='text'>JAVA PLATFORM</title><content type='html'>Java refers to a number of computer software products and specifications from Sun Microsystems that together provide a system for developing application software and deploying it in a cross-platform environment. Java is used in a wide variety of computing platforms spanning from embedded devices and mobile phones on the low end to enterprise servers and supercomputers on the high end. Java is nearly ubiquitous in mobile phones, Web servers and enterprise applications, and while less common on desktop computers, Java applets are often used to provide improved functionality while browsing the World Wide Web.&lt;br /&gt;&lt;br /&gt;Writing in the Java programming language is the primary way to produce code that will be deployed as Java bytecode, though there are compilers available for other languages such as JavaScript, Python and Ruby, and a native Java scripting language called Groovy. Java syntax borrows heavily from C and C++ but it eliminates certain low-level constructs such as pointers and has a very simple memory model where every object is allocated on the heap and all variables of object types are references. Memory management is handled through integrated automatic garbage collection performed by the Java Virtual Machine (JVM).&lt;br /&gt;&lt;br /&gt;On 13 November 2006, Sun Microsystems made the bulk of its implementation of Java available under the GNU General Public License, although there are still a few parts distributed as precompiled binaries due to intellectual property restrictions&lt;br /&gt;[edit] Platform&lt;br /&gt;The Java platform is the name for a bundle of related programs, or platform, from Sun which allow for developing and running programs written in the Java programming language. The platform is not specific to any one processor or operating system, but rather an execution engine (called a virtual machine) and a compiler with a set of standard libraries that are implemented for various hardware and operating systems so that Java programs can run identically on all of them.&lt;br /&gt;&lt;br /&gt;Different &quot;editions&quot; of the platform are available, including:&lt;br /&gt;&lt;br /&gt;Java Card: refers to a technology that allows small Java-based applications (applets) to be run securely on smart cards and similar small memory footprint devices. &lt;br /&gt;Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices which are sufficiently limited that supplying the full set of Java libraries would take up unacceptably large amounts of storage. &lt;br /&gt;Java SE (Standard Edition): For general purpose use on desktop PCs, servers and similar devices. &lt;br /&gt;Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier client-server enterprise applications. &lt;br /&gt;As of September 2008[update], the current version of the Java Platform is specified as either 1.6.0 or 6 (both refer to the same version). Version 6 is the product version, while 1.6.0 is the developer version.&lt;br /&gt;&lt;br /&gt;The Java Platform consists of several programs, each of which provides a distinct portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java bytecode (an intermediate language for the Java Virtual Machine (JVM)), is provided as part of the Java Development Kit (JDK). The Java Runtime Environment (JRE), complementing the JVM with a just-in-time (JIT) compiler, converts intermediate bytecode into native machine code on the fly. Also supplied are extensive libraries (pre-compiled into Java bytecode) containing reusable code, as well as numerous ways to deploy Java applications, including embedding them in a web page as an applet.&lt;br /&gt;&lt;br /&gt;There are several other components, some available only in certain editions.&lt;br /&gt;&lt;br /&gt;Java Virtual Machine&lt;br /&gt;&lt;br /&gt;The heart of the Java Platform is the concept of a &quot;virtual machine&quot; that executes Java bytecode programs. This bytecode is the same no matter what hardware or operating system the program is running under. There is a JIT compiler within the Java Virtual Machine, or JVM. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution.&lt;br /&gt;&lt;br /&gt;The use of bytecode as an intermediate language permits Java programs to run on any platform that has a virtual machine available. The use of a JIT compiler means that Java applications, after a short delay during loading and once they have &quot;warmed up&quot; by being all or mostly JIT-compiled, tend to run about as fast as native programs. Since JRE version 1.2, Sun&#39;s JVM implementation has included a just-in-time compiler instead of an interpreter.&lt;br /&gt;&lt;br /&gt;Although Java programs are platform independent, the code of the Java Virtual Machine (JVM) that execute these programs is not: Every supported operating platform has its own JVM.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Class libraries&lt;br /&gt;In most modern operating systems, a large body of reusable code is provided to simplify the programmer&#39;s job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java Platform is not dependent on any specific operating system, applications cannot rely on any of the pre-existing OS libraries. Instead, the Java Platform provides a comprehensive set of its own standard class libraries containing much of the same reusable functions commonly found in modern operating systems.&lt;br /&gt;&lt;br /&gt;The Java class libraries serve three purposes within the Java Platform. First, like other standard code libraries, the Java libraries provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. Second, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily intertwined with the distinctive implementations of each platform. The Java java.net and java.io libraries implement an abstraction layer in native OS code, then provide a standard interface for the Java applications to perform those tasks. Finally, when some underlying platform does not support all of the features a Java application expects, the class libraries work to gracefully handle the absent components, either by emulation to provide a substitute, or at least by providing a consistent way to check for the presence of a specific feature.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Languages&lt;br /&gt;&lt;br /&gt;The word Java, by itself, usually refers to the Java programming language which was designed for use with the Java Platform. Programming languages are typically outside of the scope of the phrase &quot;platform&quot;, although the Java programming language is listed as a core part of the Java platform. The language and runtime are therefore commonly considered a single unit.&lt;br /&gt;&lt;br /&gt;Nevertheless, third parties have produced a number of compilers or interpreters which target the JVM. Some of these are for existing languages, while others are for extensions to the Java language itself. These include:&lt;br /&gt;&lt;br /&gt;Groovy &lt;br /&gt;Jython, a Python interpreter that include jythonc, a Python-to-Java bytecode compiler &lt;br /&gt;Scala &lt;br /&gt;JRuby, a Ruby interpreter &lt;br /&gt;Rhino, a JavaScript interpreter &lt;br /&gt;Kawa and SISC, both Scheme interpreters &lt;br /&gt;ColdFusion, a dynamic language specialized for Web development which is compiled to Java bytecode. &lt;br /&gt;&lt;br /&gt;Similar platforms&lt;br /&gt;&lt;br /&gt;The success of Java and its write once, run anywhere concept has led to other similar efforts, notably the Microsoft .NET platform, appearing since 2002, which incorporates many of the successful aspects of Java. .NET in its complete form (Microsoft&#39;s implementation) is currently only fully available on Windows platforms, whereas Java is fully available on many platforms. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language (although many other languages have been made for JVM since).&lt;br /&gt;&lt;br /&gt;.NET includes a Java-like language called Visual J# (formerly known as J++) that is not compatible with the Java specification, and the associated class library mostly dates to the old JDK 1.1 version of the language; for these reasons, it is more a transitional language to switch from Java to the Microsoft .NET platform, than a first class Microsoft .NET language. Visual J# has been discontinued with the release of Microsoft Visual Studio 2008.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Java Development Kit&lt;br /&gt;&lt;br /&gt;The Java Development Kit (JDK) is a Sun product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java SDK. It contains a Java compiler and a number of other important development tools as well as a full copy of the Java Runtime Environment.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;History&lt;br /&gt;The Java platform and language began as an internal project at Sun Microsystems in December 1990, providing an alternative to the C++/C programming languages. Engineer Patrick Naughton had become increasingly frustrated with the state of Sun&#39;s C++ and C APIs (application programming interfaces) and tools. While considering moving to NeXT, Naughton was offered a chance to work on new technology and thus the Stealth Project was started.&lt;br /&gt;&lt;br /&gt;The Stealth Project was soon renamed to the Green Project with James Gosling and Mike Sheridan joining Naughton. Together with other engineers, they began work in a small office on Sand Hill Road in Menlo Park, California. They were attempting to develop a new technology for programming next generation smart appliances, which Sun expected to be a major new opportunity.&lt;br /&gt;&lt;br /&gt;The team originally considered using C++, but it was rejected for several reasons. Because they were developing an embedded system with limited resources, they decided that C++ demanded too large a footprint and that its complexity led to developer errors. The language&#39;s lack of garbage collection meant that programmers had to manually manage system memory, a challenging and error-prone task. The team was also troubled by the language&#39;s lack of portable facilities for security, distributed programming, and threading. Finally, they wanted a platform that could be easily ported to all types of devices.&lt;br /&gt;&lt;br /&gt;Bill Joy had envisioned a new language combining the best of Mesa and C. In a paper called Further, he proposed to Sun that its engineers should produce an object-oriented environment based on C++. Initially, Gosling attempted to modify and extend C++ (which he referred to as &quot;C++ ++ --&quot;) but soon abandoned that in favor of creating an entirely new language, which he called Oak, after the tree that stood just outside his office.&lt;br /&gt;&lt;br /&gt;By the summer of 1992, they were able to demonstrate portions of the new platform including the Green OS, the Oak language, the libraries, and the hardware. Their first attempt, demonstrated on September 3, 1992, focused on building a PDA device named Star7 which had a graphical interface and a smart agent called &quot;Duke&quot; to assist the user. In November of that year, the Green Project was spun off to become firstperson, a wholly owned subsidiary of Sun Microsystems, and the team relocated to Palo Alto, California. The firstperson team was interested in building highly interactive devices, and when Time Warner issued an RFP for a set-top box, firstperson changed their target and responded with a proposal for a set-top box platform. However, the cable industry felt that their platform gave too much control to the user and firstperson lost their bid to SGI. An additional deal with The 3DO Company for a set-top box also failed to materialize. Unable to generate interest within the TV industry, the company was rolled back into Sun.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Java meets the Internet&lt;br /&gt; &lt;br /&gt;Java Web Start allows provisioning applications over the WebIn June and July 1994, after three days of brainstorming with John Gage, the Director of Science for Sun, Gosling, Joy, Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted the platform for the World Wide Web. They felt that with the advent of the first graphical web browser, Mosaic, the Internet was on its way to evolving into the same highly interactive medium that they had envisioned for cable TV. As a prototype, Naughton wrote a small browser, WebRunner, later renamed HotJava.&lt;br /&gt;&lt;br /&gt;That year, the language was renamed Java after a trademark search revealed that Oak was used by Oak Technology, a manufacturer of video adaptor cards. The name Java was coined at a local coffee shop frequented by some of the members.[citation needed]&lt;br /&gt;&lt;br /&gt;In October 1994, HotJava and the Java platform were demonstrated for some of the Sun executives. Java 1.0a was made available for download in 1994, but the first public release of Java and the HotJava browser was on 23 May 1995, announced by Gage at the SunWorld conference. His announcement was accompanied by a surprise announcement by Marc Andreessen, Executive Vice President of Netscape Communications Corporation, that Netscape browsers would be including Java support. On 9 January 1996, the JavaSoft group was formed by Sun Microsystems in order to develop the technology.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Version history&lt;br /&gt;&lt;br /&gt;The Java language has undergone several changes since JDK (Java Development Kit) 1.0 was released on (January 23, 1996), as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4, the evolution of the Java Language has been governed by the Java Community Process (JCP), which uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. The language is specified by the Java Language Specification (JLS); changes to the JLS are managed under JSR 901.&lt;br /&gt;&lt;br /&gt;JDK 1.1 was released on February 19, 1997. Major additions included an extensive retooling of the AWT event model, inner classes added to the language, JavaBeans and JDBC.&lt;br /&gt;&lt;br /&gt;J2SE 1.2 (December 8, 1998) — Codename Playground. This and subsequent releases through J2SE 5.0 were rebranded Java 2 and the version name &quot;J2SE&quot; (Java 2 Platform, Standard Edition) replaced JDK to distinguish the base platform from J2EE (Java 2 Platform, Enterprise Edition) and J2ME (Java 2 Platform, Micro Edition). Major additions included reflection, a Collections framework, Java IDL (an IDL implementation for CORBA interoperability), and the integration of the Swing graphical API into the core classes. a Java Plug-in was released, and Sun&#39;s JVM was equipped with a JIT compiler for the first time.&lt;br /&gt;&lt;br /&gt;J2SE 1.3 (May 8, 2000) — Codename Kestrel. Notable changes included the bundling of the HotSpot JVM (the HotSpot JVM was first released in April, 1999 for the J2SE 1.2 JVM), JavaSound, Java Naming and Directory Interface (JNDI) and Java Platform Debugger Architecture (JPDA).&lt;br /&gt;&lt;br /&gt;J2SE 1.4 (February 6, 2002) — Codename Merlin. This was the first release of the Java platform developed under the Java Community Process as JSR 59. Major changes included regular expressions modeled after Perl, exception chaining, an integrated XML parser and XSLT processor (JAXP), and Java Web Start.&lt;br /&gt;&lt;br /&gt;J2SE 5.0 (September 30, 2004) — Codename Tiger. Originally numbered 1.5, which is still used as the internal version number. Developed under JSR 176, Tiger added a number of significant new language features including the for-each loop, generics, autoboxing and var-args.&lt;br /&gt;&lt;br /&gt;The current version, Java SE 6 (December 11, 2006) — Codename Mustang — is bundled with a database manager, facilitates the use of scripting languages (currently JavaScript using Mozilla&#39;s Rhino engine) with the JVM and has Visual Basic language support. As of this version, Sun replaced the name &quot;J2SE&quot; with Java SE and dropped the &quot;.0&quot; from the version number. Other major changes include scripting language support, support for pluggable annotations (JSR 269), lots of GUI improvements, including native UI enhancements to support the look and feel of Windows Vista, and improvements to the Java Platform Debugger Architecture (JPDA) &amp; JVM Tool Interface for better monitoring and troubleshooting&lt;br /&gt;&lt;br /&gt;Java SE 7 — Codename Dolphin. This is in the early planning stages. The Dolphin Project started up in August 2006, with release estimated in 2008. New builds including enhancements and bug fixes are released approximately weekly.&lt;br /&gt;&lt;br /&gt;In addition to the language changes, much more dramatic changes have been made to the Java class library over the years, which has grown from a few hundred classes in JDK 1.0 to over three thousand in J2SE 5.0. Entire new APIs, such as Swing and Java2D, have been introduced, and many of the original JDK 1.0 classes and methods have been deprecated.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Usage&lt;br /&gt;&lt;br /&gt;Desktop use&lt;br /&gt;According to Sun, the Java Runtime Environment is found on over 700 million PCs. Microsoft has not bundled a Java Runtime Environment (JRE) with its operating systems since Sun Microsystems sued Microsoft for adding Windows-specific classes to the bundled Java runtime environment, and for making the new classes available through Visual J++. A Java runtime environment is bundled with Apple&#39;s Mac OS X, and many Linux distributions include the partially compatible free software package GNU Classpath.&lt;br /&gt;&lt;br /&gt;Some Java applications are in fairly widespread desktop use, including the NetBeans and Eclipse integrated development environments, and file sharing clients such as LimeWire and Vuze. Java is also used in the MATLAB mathematics programming environment, both for rendering the user interface and as part of the core system.&lt;br /&gt;&lt;br /&gt;Mobile devices&lt;br /&gt;Java ME has become popular in mobile devices, where it competes with Symbian, BREW, and the .NET Compact Framework.&lt;br /&gt;&lt;br /&gt;The diversity of mobile phone manufacturers has led to a need for new unified standards so programs can run on phones from different suppliers - MIDP. The first standard was MIDP 1, which assumed a small screen size, no access to audio, and a 32kB program limit. The more recent MIDP 2 allows access to audio, and up to 64kB for the program size. With handset designs improving more rapidly than the standards, some manufacturers relax some limitations in the standards, for example, maximum program size</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/6594800282919960619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/6594800282919960619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/6594800282919960619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/6594800282919960619'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/java-platform.html' title='JAVA PLATFORM'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-4445100579319676043</id><published>2008-10-07T11:25:00.000-07:00</published><updated>2008-10-07T11:27:50.421-07:00</updated><title type='text'>JAVA PROGRAMMING/NETWORKING</title><content type='html'>Prior to modern networking solutions there existed workstations that were connected to a massive Mainframe computer that was solely responsible for memory management, processes and almost everything. The workstations would just render the information sent in from the Mainframe console.&lt;br /&gt;&lt;br /&gt;But in the mid 90&#39;s, with the prices of Unix servers dropping, the trend was moving away from Mainframe computing toward Client-Server computing. This would enable rich clients to be developed on workstations while they would communicate with a centralized server, serving computers connected to it, to either communicate with other workstations also connected to it or it would request for database access or business logic stored on the server itself. The workstations were called clients.&lt;br /&gt;&lt;br /&gt;This form of computing gave rise to the notion of the Front-end and Back-end programming. In it&#39;s hey-day, Java came up with different ways of making networking between computers possible. In this chapter, we would be looking at some of these ways. Listed below are two of the frameworks that Java uses to enable network programming. We would be exploring both of these in this chapter.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/4445100579319676043/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/4445100579319676043' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4445100579319676043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4445100579319676043'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/java-programmingnetworking.html' title='JAVA PROGRAMMING/NETWORKING'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-7612727009542517986</id><published>2008-10-07T11:23:00.000-07:00</published><updated>2008-10-07T11:24:30.450-07:00</updated><title type='text'>JAVA PROGRAMMING REFLECTION</title><content type='html'>Reflection is a new concept in Java, and did not exist in classical compiled languages like C, and C++. The idea is to discover an object&#39;s attributes and its methods progrematically.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Reflection is the mechanism by which Java exposes the features of a class during runtime, allowing Java programs to enumerate and access a class&#39; methods, fields, and constructors as objects. In other words, there are object based mirrors which reflect the Java object model, and you can use these objects to access an object&#39;s features using runtime API constructs instead of compile time language constructs.&lt;br /&gt;&lt;br /&gt;Each object instance has a getClass() method, inherited from java.lang.Object, which returns an object with the runtime representation of that object&#39;s class; this object is an instance of the java.lang.Class This object in turn has methods which return the fields, methods, constructors, superclass, and other properties of that class.&lt;br /&gt;&lt;br /&gt;You can use these reflection objects to access fields, invoke methods, or instantiate instances, all without having compile time dependencies on those features. The Java runtime provides the corresponding classes for reflection. Most of the Java classes which support reflection are in the java.lang.reflect package.&lt;br /&gt;&lt;br /&gt;Reflection is most useful for performing dynamic operations with Java - operations which are not hard coded into a source program but which are determined at run time. One of the most important aspects of reflection is dynamic class loading.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/7612727009542517986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/7612727009542517986' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/7612727009542517986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/7612727009542517986'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/java-programming-reflection.html' title='JAVA PROGRAMMING REFLECTION'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-6495764486033820008</id><published>2008-10-07T11:17:00.000-07:00</published><updated>2008-10-07T11:21:54.941-07:00</updated><title type='text'>DESIGN PATTERN</title><content type='html'>A design pattern is not a finished design, it is a description of a solution to a common problem. A design pattern can be reused in multiple applications, and that is the main advantage of using it. It can also be seen as a template for how to solve a problem that can occur in many different situations and/or applications. It is not code reuse as it usually does not specify code, but code can be easily created from a design pattern. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved.&lt;br /&gt;&lt;br /&gt;Each design pattern consist of the following part:&lt;br /&gt;&lt;br /&gt;Problem/requirement  &lt;br /&gt;To create a design pattern, we need to go through a mini analysis design and may be coding to test out the solution. This section state the requirements the problem we want to solve. This is usually a common problem that will occur in more than one application. &lt;br /&gt;Forces  &lt;br /&gt;This section state the technological boundaries, that helps and guides the creation of the solution. &lt;br /&gt;Solution  &lt;br /&gt;This section describes how to write the code to solve the above problem. This is the design part of the design pattern. It may contain class diagrams, sequence diagrams, and or whatever is needed to describe how to code the solution. &lt;br /&gt;A design pattern can be considered as block that can be placed in your design document, and you have to implement the design pattern with your application.&lt;br /&gt;&lt;br /&gt;Using design patterns speeds up your design and helps to communicate your design to other team members.&lt;br /&gt;&lt;br /&gt;Creational Patterns&lt;br /&gt;&lt;br /&gt;Builder&lt;br /&gt;Separate the construction of a complex object from its representation so that the same construction process can create different representations.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Factory Method&lt;br /&gt;problem  &lt;br /&gt;We want to decide at run time what object is to be created based on some configuration or application parameter. When we write the code we do not know what class should be instantiated. &lt;br /&gt;Solution  &lt;br /&gt;Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. &lt;br /&gt;&lt;br /&gt;Abstract Factory&lt;br /&gt;Provide an interface for creating families of related or dependent objects without specifying their concrete classes.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; Prototype&lt;br /&gt;Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.&lt;br /&gt;&lt;br /&gt;Structural Patterns&lt;br /&gt;&lt;br /&gt;Adapter&lt;br /&gt;Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn&#39;t otherwise because of incompatible interfaces.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bridge&lt;br /&gt;The Bridge Pattern is used to separate out the interface from its implementation. Doing this gives the flexibility so that both can vary independently.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Composite&lt;br /&gt;Components that are individual objects and also can be collection of objects. A Composite pattern can represent both the conditions. In this pattern, one can develop tree structures for representing part-whole hierarchies.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Decorator&lt;br /&gt;The decorator pattern helps to add behavior or responsibilities to an object. This is also called “Wrapper”.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Facade&lt;br /&gt;A Facade pattern hides the complexities of the system and provides an interface to the client from where the client can access the system.&lt;br /&gt;&lt;br /&gt;Dividing a system into subsystems helps reduce complexity. We need to minimize the communication and dependencies between subsystems. For this, we introduce a facade object that provides a single, simplified interface to the more general facilities of a subsystem.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Flyweight&lt;br /&gt;It is a mechanism by which you can avoid creating a large number of object instances to represent the entire system. To decide if some part of a program is a candidate for using Flyweights, consider whether it is possible to remove some data from the class and make it extrinsic.&lt;br /&gt;&lt;br /&gt;Proxy&lt;br /&gt;It is used when you need to represent a complex with a simpler one. If creation of object is expensive, its creation can be postponed till the very need arises and till then, a simple object can represent it. This simple object is called the “Proxy” for the complex object.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Behavioral Patterns&lt;br /&gt;&lt;br /&gt;Chain of Responsibility&lt;br /&gt;&lt;br /&gt;Command&lt;br /&gt;&lt;br /&gt;Scope&lt;br /&gt;Object&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Purpose&lt;br /&gt;Behavioural&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Intent&lt;br /&gt;encapsulate the request for a service as an object&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Applicability&lt;br /&gt;to parameterize objects with an action to perform &lt;br /&gt;to specify, queue, and execute requests at different times &lt;br /&gt;for a history of requests &lt;br /&gt;for multilevel undo/redo</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/6495764486033820008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/6495764486033820008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/6495764486033820008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/6495764486033820008'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/design-pattern.html' title='DESIGN PATTERN'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-1623144443097085987</id><published>2008-10-07T11:14:00.000-07:00</published><updated>2008-10-07T11:16:39.063-07:00</updated><title type='text'>JAVA IDE</title><content type='html'>A Java IDE (Integrated Development Environment) is a software which enables the users to write and debug Java programmes easily. Some of them highlights keywords, some have popup menus for methods and attributes and thus help the users to do the stuff easily.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;JAVA IDEs&lt;/strong&gt;JCreator&lt;br /&gt;JCreator is a simple and light weight JAVA IDE - it runs only on Windows platforms. It is very easy to install and starts quickly, as it is a native application. This is a good choice for beginners.&lt;br /&gt;&lt;br /&gt;NetBeans&lt;br /&gt;NetBeans is some what heavy IDE but helps a lot. Specially you can create Java applications for mobile devices easily with Mobility PacK in NetBeans. With Netbeans 6.0, the IDE has become one of the best available development tools, whether it be designing a Swing UI, building a mobile application, an enterprise application or using it as a platform for creating your own IDE.&lt;br /&gt;&lt;br /&gt;Processing&lt;br /&gt;Processing is an enhanced IDE. It adds some extra commands and a simplified programming model. This makes it much easier for beginners to start programming in Java. It was designed to help graphic artists learn a bit of programming without struggling too much. Processing runs on Windows, Linux and Mac platforms.&lt;br /&gt;&lt;br /&gt;Among Other JAVA IDEs are&lt;br /&gt;&lt;br /&gt;Eclipse&lt;br /&gt;DrJava&lt;br /&gt;BlueJ&lt;br /&gt;jGRASP&lt;br /&gt;J++&lt;br /&gt;Visual J++&lt;br /&gt;Visual Cafe&lt;br /&gt;Zeus for Windows IDE&lt;br /&gt;Kawa&lt;br /&gt;JBuilder&lt;br /&gt;JDeveloper (by Oracle, Freeware)&lt;br /&gt;Gel&lt;br /&gt;JIPE&lt;br /&gt;jEdit&lt;br /&gt;IntelliJ IDEA</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/1623144443097085987/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/1623144443097085987' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/1623144443097085987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/1623144443097085987'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/java-ide.html' title='JAVA IDE'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-4766416173771886751</id><published>2008-10-07T11:12:00.001-07:00</published><updated>2008-10-07T11:13:41.861-07:00</updated><title type='text'>JAVA PROGRAMMING/EXCEPTIONS</title><content type='html'>In Java, there are two main flow of code executions.&lt;br /&gt;&lt;br /&gt;Normal main sequential code execution, the program doing what it meant to accomplish &lt;br /&gt;Exception handling code execution, the main program flow was interrupted by an error or some other condition that prevent the continuation of the normal main sequential code execution. &lt;br /&gt;Exception  &lt;br /&gt;Exceptions are Java&#39;s way of error handling. Whenever an unexpected condition occurs, an exception can be thrown with an exception object as a parameter. It means that the normal program control flow stops and the search for a catch block begins. If that is not found at the current method level the search continues at the caller method level, until a matching catch block is found. If none is found the exception will be handled by the JVM, and usually the java program terminates. &lt;br /&gt;When a catch &quot;matching&quot; block is found, that block will be executed, the exception object is passed to the block as a parameter. Then normal program execution continues after the catch block. See Java exception handling syntax &lt;br /&gt;Exception Object  &lt;br /&gt;This is the object that is &quot;thrown&quot; as a parameter from the error, and passed to the catch block. Exception object encapsulates the information about the error&#39;s location and its nature. All Exception objects must be inherited from the java.lang.Throwable. See the UML diagram below. &lt;br /&gt;Matching rule  &lt;br /&gt;A thrown exception object can be caught by the catch keyword and specifying the exception object&#39;s class or its super-class. &lt;br /&gt;Naming convention  &lt;br /&gt;It is good practice to add Exception to all exception classes. Also the name of the exception should be meaningful, should represent the problem. For example CustomerNotFoundException indicate that customer was not found.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/4766416173771886751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/4766416173771886751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4766416173771886751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4766416173771886751'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/java-programmingexceptions.html' title='JAVA PROGRAMMING/EXCEPTIONS'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-3586455530546611853</id><published>2008-10-07T11:07:00.000-07:00</published><updated>2008-10-07T11:10:48.638-07:00</updated><title type='text'>LANGUAGE FUNDAMENTALS</title><content type='html'>&lt;strong&gt;Language Fundamentals&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This section introduces the fundamental elements of the Java programming language.&lt;br /&gt;&lt;br /&gt;When learning a new language, the first step one must take is to learn its syntax rules and keywords. Combining the two, one creates statements, Programming Blocks, Classes, Interfaces, et al.&lt;br /&gt;&lt;br /&gt;Use packages to avoid name collisions. To hide as much information as possible use the access modifiers properly.&lt;br /&gt;&lt;br /&gt;Create methods that do one and if possible only one thing/task. If possible have separate method that changes the object state.&lt;br /&gt;&lt;br /&gt;In an object oriented language, programs are run with objects; however, for ease of use and for historic reasons, Java has primitive types. Primitive Data Types only store values and have no methods. Primitive Types may be thought of as Raw Data and are usually embedded attributes inside objects or used as local variables in methods. Because primitive types are not subclasses of the object superclass, each type has a Wrapper Class which is a subclass of Object, and can thus be stored in a collection or returned as an object.&lt;br /&gt;&lt;br /&gt;Java is a strong type checking language. There are two concepts regarding types and objects. One is the object type and the other the template/class the object was created from. When an object is created, the template/class is assigned to that object which can not be changed. Types of an object however can be changed by type casting. Types of an object is associated with the object reference that referencing the object and determines what operation can be performed on the object through that object reference. Assigning the value of one object reference to a different type of object reference is called type casting.&lt;br /&gt;&lt;br /&gt;The most often used data structure in any language is a character string. For this reason java defines a special object that is String.&lt;br /&gt;&lt;br /&gt;To aggregate same type java objects to an array, java has a special array object for that. Both java objects and primitive types can be aggregated to arrays</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/3586455530546611853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/3586455530546611853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/3586455530546611853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/3586455530546611853'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/language-fundamentals.html' title='LANGUAGE FUNDAMENTALS'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-2882810848320786817</id><published>2008-10-07T11:05:00.000-07:00</published><updated>2008-10-07T11:06:56.756-07:00</updated><title type='text'>PNUTS</title><content type='html'>Pnuts is a dynamic scripting language for the Java Platform. It is designed to be used in a dual language system with the Java programming language. The goals of the Pnuts project are to provide a small, fast scripting language that has tight integration with the Java language. Pnuts uses syntax that is simple and friendly to Java developers, while also being very expressive.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Relationship to Java&lt;/strong&gt;&lt;br /&gt;Because Java and Pnuts share the same type system, Java code can easily invoke or define Pnuts functions. Likewise, Pnuts code can easily manipulate Java objects. Pnuts code can even define Java classes. Because Pnuts compiles to Java byte codes, these classes can be used by Java just like any other class. A class written in Pnuts can even later be replaced by a class written in Java with no other code changes.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;br /&gt;Pnuts was originally developed in 1997 by Toyokazu Tomatsu as a testing tool for Java classes. Pnuts has since been extended, mainly focusing on essential functionality required for a Java-based scripting engine, such as a module system and bytecode compiler.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/2882810848320786817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/2882810848320786817' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/2882810848320786817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/2882810848320786817'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/pnuts.html' title='PNUTS'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-8493651355921230366</id><published>2008-10-07T10:59:00.000-07:00</published><updated>2008-10-07T11:04:37.505-07:00</updated><title type='text'>JRUBY</title><content type='html'>JRuby is a Java implementation of the Ruby interpreter, being developed by the JRuby team.&lt;br /&gt;&lt;br /&gt;JRuby is free software released under a three-way CPL/GPL/LGPL license.&lt;br /&gt;&lt;br /&gt;JRuby is tightly integrated with Java to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code. (Compare Jython for the Python language.)&lt;br /&gt;&lt;br /&gt;JRuby&#39;s lead developers are Charles Nutter , Thomas Enebo, Ola Bini  and Nick Sieger . In September 2006, Sun Microsystems hired Enebo and Nutter to work on JRuby full time. In June 2007, ThoughtWorks hired Ola Bini to work on Ruby and JRuby.&lt;br /&gt;&lt;br /&gt;History&lt;br /&gt;JRuby was originally created by Jan Arne Petersen, in 2001. At that time and for several years following, the code was a direct port of the Ruby 1.6 C code. With the release of Ruby 1.8.6, an effort began to update JRuby to 1.8.6 features and semantics. Since 2001, several contributors have assisted the project, leading to the current (2008) core team of four members.&lt;br /&gt;&lt;br /&gt;The Netbeans Ruby Pack, available since NetBeans 6.0, allows IDE development with Ruby and JRuby, as well as Ruby on Rails for the two implementations of Ruby .&lt;br /&gt;&lt;br /&gt;JRuby 1.1 added Just-in-time compilation and Ahead-of-time compilation modes to JRuby and is faster in most cases than the current Ruby 1.8.7 reference implementation.&lt;br /&gt;&lt;br /&gt;JRuby 1.1.1 is stated to be packaged in Fedora 9.&lt;br /&gt;&lt;br /&gt;Since version 1.1.1, the JRuby team began to issue point releases often to address quickly issues that may be brought up by users.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Rails&lt;/strong&gt;&lt;br /&gt;JRuby has supported Ruby on Rails since version 0.9 (May 2006) , with the ability to execute RubyGems and WEBrick. Since the hiring of the two lead developers by Sun, Rails compatibility and speed have improved greatly. JRuby version 1.0 successfully passed nearly all of Rails&#39; own test cases. Since then, developers have begun to use JRuby for Rails applications in production environments .&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Multiple Virtual Machine Collaboration&lt;/strong&gt;&lt;br /&gt;On February 27, 2008, Sun Microsystems and the University of Tokyo announced a joint-research project to implement a Virtual Machine capable of executing more than one Ruby or JRuby application on one interpreter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dynamic Invocation on Java Virtual Machines&lt;/strong&gt;&lt;br /&gt;JSR 292 (Supporting Dynamically Typed Languages on the JavaTM Platform)  propose to:&lt;br /&gt;&lt;br /&gt;add a new invokedynamic instruction at the JVM level, to allow method invocation relying on dynamic Type checking, &lt;br /&gt;to be able to change the classes and method at runtime dynamically in a production environment. &lt;br /&gt;The Sun Open source project Multi Language Virtual Machine aim to prototype this JSR. The first working prototype, developed as a patch on OpenJDK, was announced and made available on end of August 2008.&lt;br /&gt;&lt;br /&gt;The JRuby team has successfully wired dynamic invocation in their codebase, albeit in a very primitive way. Dynamic invocation will ship with the next 1.1.5 release, and will be disabled on JVMs without Dynamic invocation capabilities.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Design&lt;/strong&gt;&lt;br /&gt;Since early 2006, the current JRuby core team has endeavored to move JRuby beyond being a simple C port, to support better performance and to aid eventual compilation to Java bytecode. To support this end, the team set an ambitious goal: to be able to run Ruby on Rails unmodified using JRuby. In the process of achieving this goal, the JRuby test suite expanded to such extent that the team gained confidence in the &quot;correctness&quot; of JRuby. As a result, toward the end of 2006 and in the beginning of 2007, they began to commit much more complicated redesigns and refactorings of JRuby&#39;s core subsystems.&lt;br /&gt;&lt;br /&gt;JRuby is designed to work as a mixed-mode virtual machine for Ruby, where code can be either interpreted directly, just-in-time compiled at runtime to Java bytecode, or ahead-of-time compiled to Java bytecode before execution. Until October 2007, only the interpreted mode supported all Ruby&#39;s constructs, but a full AOT/JIT compiler is available since version 1.1[18]. The compiler design allows for interpreted and compiled code to run side-by-side, as well as decompilation to reoptimize and outputting generated bytecode as Java class files.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/8493651355921230366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/8493651355921230366' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8493651355921230366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8493651355921230366'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/jruby.html' title='JRUBY'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-8440834644858653706</id><published>2008-10-07T10:55:00.000-07:00</published><updated>2008-10-07T10:59:26.119-07:00</updated><title type='text'>JPHTHON</title><content type='html'>Jython, successor of JPython, is an implementation of the Python programming language written in java.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Jython programs can seamlessly import and use any Java class. Except for some standard modules, Jython programs use Java classes instead of Python modules. Jython includes almost all of the modules in the standard Python programming language distribution, lacking only some of the modules implemented originally in C. For example, a user interface in Jython would be written with Swing, AWT or SWT. Jython compiles to Java bytecode (intermediate language) either on demand or statically.&lt;br /&gt;&lt;br /&gt;Jython also includes jythonc, a compiler that converts Python source code into Java bytecode. This allows Python programmers to write classes which can be fully utilized by a Java program.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;License terms&lt;/strong&gt;&lt;br /&gt;Jython is released under a mix of three licenses: the Python Software Foundation License (v2), the Jython 2.0, 2.1 license, and the JPython 1.1.x Software License. The first two are permissive free software licenses. The third also appears to be but this is unclear because neither Free Software Foundation or Open Source Initiative have reviewed and commented on it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;br /&gt;Jim Hugunin created Jython in late 1997, and developed it until 1999. In February 1999, Barry Warsaw took over as the primary developer. In October 2000, Jython moved to SourceForge. For a long time, Samuele Pedroni did most of the work to maintain and develop Jython. To the end of 2004, Pedroni stepped down as the primary developer to concentrate his effort to PyPy, but he is still considered the authority on Jython internals. In January 2005, Brian Zimmer received a grant from the Python Software Foundation to develop Jython. In December 2005, Frank Wierzbicki succeeded Zimmer as the primary developer. During 2005, development was slow due to lack of knowledgeable developers.&lt;br /&gt;&lt;br /&gt;On March 3, 2008, it was announced that Sun Microsystems hired Ted Leung and Frank Wierzbicki to work on Jython and Python, similar to Sun&#39;s hiring of two JRuby developers. Development progresses steadily, and Jython can now even run Django, a Python framework comparable to Ruby on Rails.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Status and roadmap&lt;/strong&gt;&lt;br /&gt;The current release is Jython-2.2.1. It includes improvements to Java integration and implements the same set of language features as CPython 2.2. CPython 2.5 is targeted for the next release.&lt;br /&gt;&lt;br /&gt;Developments are going steady and an alpha version of the corresponding Jython 2.5 release has been available since July 2008.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;br /&gt;Jython is one of two scripting languages (with Jacl) used in WebSphere Application Server. It is used in IBM Rational development tools, where Jython projects can be created using wizards.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/8440834644858653706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/8440834644858653706' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8440834644858653706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8440834644858653706'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/jphthon.html' title='JPHTHON'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-2010577283426760192</id><published>2008-10-07T10:54:00.000-07:00</published><updated>2008-10-07T10:55:04.258-07:00</updated><title type='text'>JAVA  POSE</title><content type='html'>The Java Posse is a podcast of news, discussion, and interviews about the Java programming language and associated Java technologies. The four regular contributors are Tor Norbye (Sun Microsystems), Carl Quinn (Google), Dick Wall (Navigenics) and Joe Nuxoll (Navigenics). By January 2007, the estimated listenership was between 7,000 and 10,000 people.&lt;br /&gt;&lt;br /&gt;The podcast was begun in September 2005 and was a successor to an earlier short-lived Java podcast produced by Wall called &quot;JavaCast&quot;, cohosted with Brandon Werner. As of December 2007, over 150 episodes of The Java Posse have been recorded. The group has also organized the &quot;Java Posse Roundup&quot;, an unconference held in Crested Butte, Colorado in 2007 and organized by Bruce Eckel. Sessions from the roundup have been published as episodes of the podcast</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/2010577283426760192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/2010577283426760192' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/2010577283426760192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/2010577283426760192'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/java-pose.html' title='JAVA  POSE'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-8051876609756275256</id><published>2008-10-07T10:38:00.000-07:00</published><updated>2008-10-07T10:54:05.195-07:00</updated><title type='text'>CRITICISM OF JAVA</title><content type='html'>The Java programming language was intended to serve as a novel way to manage software complexity, though a number of criticisms have been leveled at the language.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Class path&lt;/strong&gt;&lt;br /&gt;Running a Java program originally required all third-party supporting libraries to be in the class path.&lt;br /&gt;&lt;br /&gt;Prior to Java 6 it was necessary for each .jar or .zip archive required to be explicitly named in the class path. Java 6 provides a way around this by allowing directories listed in the class path to end in an asterisk (*), which will be expanded to the names of all files ending in .jar or .JAR within the directory. Such an entry does not, however, match .zip or .class files within that directory.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Resource management&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Java performs garbage collection, so memory management is automatic, which makes allocation and deallocation errors such as memory leaks less likely and, barring errors in the VM, eliminates segmentation violations. But it does not manage all resources, such as file handles, JDBC database connections, and network connections; these must be released just as memory would need to be in C++. Leaks are particularly likely when exceptions are thrown, if try/catch/final are not used properly.&lt;br /&gt;&lt;br /&gt;Java ensures the execution of &quot;finalization&quot; methods before garbage collection occurs, without guaranteeing any particular order of execution between related resources, and without guaranteeing when or even if automatic garbage collection of any given object will occur.&lt;br /&gt;&lt;br /&gt;Conceptually, Java always allocates objects on the heap. Only the compiler may optimize this to faster stack-based allocation. In this respect Java is less flexible than C++, which allows (requires) the programmer to control where objects are allocated. In both languages, values of primitives type are allocated on the stack, and the compiler decides how to use the available registers.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Language choices&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt; &lt;strong&gt;Primitives vs. objects&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Java designers decided not to implement certain features present in other languages (including multiple inheritance, operator overloading, and tuples). Java permits multiple inheritance of interfaces but not of implementations.&lt;br /&gt;&lt;br /&gt;Java&#39;s primitive types are not objects. Primitive types hold their values in the stack rather than being references to values. Because of this, Java is not considered to be a pure object-oriented programming language and this makes reflection more complicated. The motivation for primitive types being non-object oriented was performance considerations.&lt;br /&gt;&lt;br /&gt;Java 5.0 and later supports automatic conversion (autoboxing) of primitive data types to corresponding object form wherever required. This is not without problems, however:&lt;br /&gt;&lt;br /&gt;Special care must be taken when comparing two boxed primitive types as the boxed instances may have identity as reference objects. &lt;br /&gt;When autounboxing, a null pointer exception may be thrown. Since this operation occurs implicitly (without a cast or method call), this unchecked exception may not be obvious by inspection of the line of code to an unfamiliar reader. &lt;br /&gt;Boxed primitives do not allow for operator based arithmetic; either the programmer must ensure an unbox operation, or she must use member methods which does not lend itself to be read as fluently as operator based arithmetic. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Generics&lt;/strong&gt;&lt;br /&gt;When generics were added to Java 5.0, there was already a large framework of classes (many of which were already deprecated), so generics were chosen to be implemented using erasure to allow for migration compatibility and re-use of these existing classes. This limited the features that could be provided by this addition as compared to other languages.&lt;br /&gt;&lt;br /&gt; There is a common misconception that type erasure was necessary for backwards compatibility in the sense that old code could run on a new JVM and new code could call old code. However, this was entirely possible without type erasure (i.e. with reified generics), as has been demonstrated with the addition of generics to the very similar C# programming language[citation needed]. Java 5.0 could have implemented new generic collections classes with reified generics and have those collection classes implement the non-generic collection interfaces such as IList, ISet etc.&lt;br /&gt;&lt;br /&gt;Type erasure was only necessary because of a requirement for a temporary migration compatibility; a requirement that the collection classes be the same classes, so that code which did not insulate itself through use of interfaces (thus breaking best practices) could co-exist in the same JVM with new generic style code without the use of wrapping techniques.&lt;br /&gt;&lt;br /&gt;Type erasure has several drawbacks:&lt;br /&gt;&lt;br /&gt;Typecasting overhead when inserting and removing from a collection and when calling any other method of a generic type which takes a parameter of a parameterized type. &lt;br /&gt;Inability to use primitive types as type parameters. Because all types must be of reference type and must be &quot;erased&quot; to their upper bounds, it was not possible to allow the use of primitive types. Instead Java 5.0 features autoboxing which &quot;boxes&quot; primitive type on insertion into collections, thus incurring extra overhead and making the code more opaque. &lt;br /&gt;What looks like separate classes at development time is really a single class at runtime. Thus static (class-level) members are shared among all classes realized from the generic class. &lt;br /&gt;Inability to create new instances or new arrays of types defines through a type parameter. &lt;br /&gt;Disparity with arrays which means that in general the developer should never let a method return an array of a parametric type. &lt;br /&gt;The type erasure process may produce clashing method signatures. &lt;br /&gt;Inability to implement different realizations of the same generic interface. &lt;br /&gt;Inability to use generic exceptions &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Non-Virtual methods&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Java provides no way to make methods non-virtual (although they can be &quot;sealed&quot; by using the final modifier to disallow overriding). This means that there is no way to let derived classes define a new, unrelated method with the same name. This can be a problem when a base class is designed by a different person, and a new version introduces a method with the same name and signature as some method already present in the derived class. This means that the method in the derived class will implicitly override the method in the base class, even though that was not the intent of the designers of either class. To partially accommodate for these versioning problems, Java 5.0 introduced the @Override annotation, but to preserve backwards compatibility it could not be made compulsory by default.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Single paradigm&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Java is predominantly a single-paradigm language. The addition of static imports in Java 5.0 accommodates the procedural paradigm better than earlier versions of Java. It is expected that the addition of new language features like closures (or lambdas) in version 7 will allow a more functional style (but the language specification has not yet been finalised).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Exception handling&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Java embraced the concept of exception specifications from C++ where they were optional, but made throws clauses mandatory for any checked exception. While this can be a benefit for small systems, there is no universal agreement that using checked exceptions is a benefit for larger systems. In particular, &quot;higher level&quot; code is often not interested in errors thrown by &quot;lower level&quot; code (eg: NamingException). The coder of the naming classes must make a choice: either force higher level code to deal with naming exceptions as checked exceptions, or allow them to &quot;bubble up&quot; through his own low-level code without compile-time checks.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Closure&lt;/strong&gt;  &lt;br /&gt;&lt;br /&gt;Finally, while anonymous inner classes provide a basic form of closures, they are not complete and require referenced variables to either be class fields or declared &quot;final&quot;. The rationale behind this is that it allows JVM implementors to choose a stack model for variable lifetimes, so that a variable scope is removed when exited, thus preventing real closures. In addition, when using - for instance - &quot;Runnable&quot; as a closure, one has to declare the &quot;run&quot; method and put the code in that: you cannot simply put some code in braces and pass it around (however the Java 7 language specification is aiming to address this with first class closures).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Floating point arithmetic&lt;/strong&gt;&lt;br /&gt;While Java&#39;s floating point arithmetic is largely based on IEEE 754 (Standard for Binary Floating-Point Arithmetic), certain features are not supported even when using the strictfp modifier, such as Exception Flags and Directed Roundings — capabilities mandated by IEEE Standard 754. Many so-called &quot;Java gotchas&quot; are not problems with Java per se, but problems that are inevitable whenever using floating point arithmetic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Look and feel&lt;/strong&gt;&lt;br /&gt; look and feel of GUI applications written in Java using the Swing platform may look different from native applications. While programmers can choose to use the AWT toolkit that displays native widgets (and thus look like the operating platform), the AWT toolkit is unable to meet advanced GUI programming needs by wrapping around advanced widgets and not sacrificing portability across the various supported platforms, each of which have vastly different APIs especially for higher-level widgets. If an alternative GUI toolkit is used, such as SWT, it is possible for a Java application to have native look and feel whilst also having access to advanced widgets.&lt;br /&gt;&lt;br /&gt;The Swing toolkit – written completely in Java – both creates the problem of having a different look and feel from native applications, and avoids the problem of being limited by native toolkit capabilities because it reimplements widgets using only the most basic drawing mechanisms that are guaranteed available on all platforms. Unfortunately, the default installations of the JRE (as of August 2006) do not use the system&#39;s &quot;native&quot; look and feel, instead defaulting to the built-in Metal Look and Feel. If the programmer doesn&#39;t take care to set the native look and feel, users will have applications whose appearance is vastly different from that of their native applications. Apple Computer&#39;s own optimized version of the Java Runtime, which is included within the Mac OS X distribution, by default does set the default and implements its &quot;Aqua&quot; look-and-feel, giving Swing applications on the Macintosh a similar appearance to native software. Even in this environment, the programmer must still do some extra work to ensure that that application looks like an Aqua one (for example, they must set system properties to ensure the menubar is rendered in the OS X menubar and not in the application window as it would be on other platforms).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Java&#39;s performance has improved substantially since the early versions, and performance of JIT compilers relative to native compilers has in some tests been shown to be quite similar. 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;br /&gt;&lt;br /&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.[19] Sun Microsystems have taken considerable trouble to address these problems, and regularly produce white papers on this topic. A more recent study (2003–4) gives Java a comparable performance to C++.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;General&lt;/strong&gt;&lt;br /&gt;Java bytecode can either be interpreted at run time by a virtual machine, or it can be compiled at load time or runtime into machine code which runs directly on the computer&#39;s hardware. Interpretation is slower than native execution, and compilation at load time or runtime has an initial performance penalty for the compilation.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Language constraints&lt;/strong&gt;&lt;br /&gt;There are a few language requirements which incur an unavoidable time penalty, although these features are not unique to Java. Among these are array bounds checking, run-time type checking, and virtual function indirection (although each of these can in some situations be avoided by an optimizing compiler). Also the lack of features can affect performance. For example, Java does not have arrays of structures or a true multi-dimensional array, but only an array of references to objects or further arrays. Nor does Java allow returning more than one value from a function without using an object. The net result is that Java code makes more heap allocations than some other languages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Garbage collection&lt;/strong&gt;&lt;br /&gt;The garbage collector controls when objects are deleted from memory. Java does not allow the programmer to control when garbage collection occurs - it cannot be delayed, or exercised on a particular object. While this makes programming much simpler and reduces memory leaks, it lacks the flexibility that can, in some cases, result in a more efficient handling of memory. The programmer can call the function System.gc() as a hint that this is a suitable time to run the garbage collector, but the JVM is not obliged to honour this suggestion. Lower-level languages provide more flexibility over memory management, and while garbage collection is not part of the language specification and therefore its use is not mandated, in some cases (notably C and C++) a number of third-party garbage collectors are available.&lt;br /&gt;&lt;br /&gt;The use of a garbage collector to automatically delete objects can add overhead compared to manual deallocation and can have a positive or negative impact on performance depending upon the garbage collector implementation and the characteristics of the application&#39;s use of objects. With the modern generational garbage collectors used in many JVMs, many applications actually experience greater performance because of faster allocation and deallocation algorithms.&lt;br /&gt;&lt;br /&gt;Because the garbage collector may run at any time, Java is unsuitable for real time programming. In older JVM implementations, collection paused the program&#39;s own threads. The current implementation, using concurrent collection, does not need to pause the program but will typically slow its execution. This is problematic in a real-time environment because making scheduling guarantees is impossible with arbitrary interruptions, and deadlines may be missed while the garbage collector is running.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Byte code vs. native compilation&lt;/strong&gt;&lt;br /&gt;Relative performance of code produced by JIT compilers as compared to AOT compilers can be quite close, and is often a subject of debate. The JIT compilation stage may be time consuming, which is inconvenient for applications that are short-lived and/or contain large amounts of code. Once compiled to native code, however, the performance of the program can be comparable to that achieved by a native compiler, even on numerical tasks. Although Java does not support manual inlining of method calls, many JIT compilers perform this optimization at load time and can exploit information from the runtime environment to guide more effective transformations, such as profile-directed inlining. Dynamic recompilation, as provided by Sun&#39;s HotSpot JVM, can exceed the performance of the static compilation available in most other languages by exploiting information that is only available at runtime.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Hardware interfacing&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;Because Java was designed with an emphasis on security and portability, it does not support direct access to the machine architecture and address space. This means working directly with a specific piece of hardware such as a scanner, digital camera, audio recorder, video capture, or any hardware that requires direct memory space control (typically those pieces or hardware installed with drivers), cannot easily be accomplished with Java. An illustration of this issue is seen in version 1.0 of Java as it was not possible to access a printer because the interface code to the various printer drivers was not included in this first JVM.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Interfacing with native code&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;Client side or server systems that need to &quot;talk&quot; to the hardware must implement a hybrid solution using Java and C/C++ or assembly language via the Java Native Interface (JNI) libraries to link native code to the Java libraries. An alternate solution is to code the hardware software component in its native C/C++/assembler language and then pass the data via files, databases or a shared memory interface, although this is not an ideal solution.&lt;br /&gt;&lt;br /&gt;Using the JNI technique introduces many possible inconsistencies such as: machine dependency, potential deadlock situations, memory allocation leaks, and possibly poor application performance, not to mention code complexity of needing to maintain two different code bases.&lt;br /&gt;&lt;br /&gt;However, other simpler solutions have been developed since JNI. Java Native Access is comparable to .NET P/Invoke, in that no boilerplate C glue code have to be written to be able to access the native library.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/8051876609756275256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/8051876609756275256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8051876609756275256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/8051876609756275256'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/10/criticism-of-java.html' title='CRITICISM OF JAVA'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-3022200411745599100</id><published>2008-09-13T11:28:00.000-07:00</published><updated>2008-09-13T11:37:47.024-07:00</updated><title type='text'>JAVA VIRTUAL MACHINE</title><content type='html'>A Java Virtual Machine (JVM) is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and scripts. The model used by a JVM accepts a form of computer intermediate language commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture.&lt;br /&gt;&lt;br /&gt;Java Virtual Machines operate on Java bytecode, which is normally (but not necessarily) generated from Java source code; a JVM can also be used to implement programming languages other than Java. For example, Ada source code can be compiled to Java bytecode, which may then be executed by a JVM. JVMs can also be released by other companies besides Sun (the developer of Java) — JVMs using the &quot;Java&quot; trademark may be developed by other companies as long as they adhere to the JVM specification published by Sun (and related contractual obligations).&lt;br /&gt;&lt;br /&gt;The JVM is a crucial component of the Java Platform. Because JVMs are available for many hardware and software platforms, Java can be both middleware and a platform in its own right — hence the expression &quot;write once, run anywhere.&quot; The use of the same bytecode for all platforms allows Java to be described as &quot;compile once, run anywhere&quot;, as opposed to &quot;write once, compile anywhere&quot;, which describes cross-platform compiled languages. The JVM also enables such unique features as Automated Exception Handling which provides &#39;root-cause&#39; debugging information for every software error (exception) independent of the source code.&lt;br /&gt;&lt;br /&gt;The JVM is distributed along with a set of standard class libraries which implement the Java API (Application Programming Interface). The virtual machine and API have to be consistent with each other[dubious – discuss] and are therefore bundled together as the Java Runtime Environment.&lt;br /&gt;Execution environment&lt;br /&gt;Programs intended to run on a JVM must be compiled into a standardized portable binary format, which typically comes in the form of .class files. A program may consist of many classes in different files. For easier distribution of large programs, multiple class files may be packaged together in a .jar file (short for Java archive).&lt;br /&gt;&lt;br /&gt;The JVM runtime executes .class or .jar files, emulating the JVM instruction set by interpreting it, or using a just-in-time compiler (JIT) such as Sun&#39;s HotSpot. JIT compiling, not interpreting, is used in most JVMs today to achieve greater speed. Ahead-of-time compilers that enable the developer to precompile class files into native code for a particular platform also exist.&lt;br /&gt;&lt;br /&gt;Like most virtual machines, the Java Virtual Machine has a stack-based architecture.&lt;br /&gt;&lt;br /&gt;The JVM, which is the instance of the JRE (Java Runtime Environment), comes into action when a Java program is executed. When execution is complete, this instance is garbage-collected. JIT is the part of the JVM that is used to speed up the execution time. JIT compiles parts of the byte code that have similar functionality at the same time, and hence reduces the amount of time needed for compilation.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Support for dynamic Languages&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;Although the JVM was primarily aimed at running compiled Java programs, other languages can now run on top of it, such as:&lt;br /&gt;&lt;br /&gt;Ruby, with JRuby &lt;br /&gt;JavaScript, with Rhino &lt;br /&gt;Python, with Jython &lt;br /&gt;Common Lisp, with Armed Bear Common Lisp &lt;br /&gt;Groovy &lt;br /&gt;Scala &lt;br /&gt;The JVM has currently no built-in support for Dynamically typed languages: the existing JVM instruction set is statically typed. The JVM has a limited support for dynamically modifying existing classes and methods. It currently only works in a debugging environment.&lt;br /&gt;&lt;br /&gt;Built-in support for dynamic languages is currently planned for Java 7.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bytecode verifier&lt;/strong&gt;&lt;br /&gt;A basic philosophy of Java is that it is inherently &quot;safe&quot; from the standpoint that no user program can &quot;crash&quot; the host machine or otherwise interfere inappropriately with other operations on the host machine, and that it is possible to protect certain functions and data structures belonging to &quot;trusted&quot; code from access or corruption by &quot;untrusted&quot; code executing within the same JVM. Furthermore, common programmer errors that often lead to data corruption or unpredictable behavior such as accessing off the end of an array or using an uninitialized pointer are not allowed to occur. Several features of Java combine to provide this safety, including the class model, the garbage-collected heap, and the verifier.&lt;br /&gt;&lt;br /&gt;The JVM verifies all bytecode before it is executed. This verification consists primarily of three types of checks:&lt;br /&gt;&lt;br /&gt;Branches are always to valid locations &lt;br /&gt;Data is always initialized and references are always type-safe &lt;br /&gt;Access to &quot;private&quot; or &quot;package private&quot; data and methods is rigidly controlled. &lt;br /&gt;The first two of these checks take place primarily during the &quot;verification&quot; step which occurs when a class is loaded and made eligible for use. The third is primarily performed dynamically, when data items or methods of a class are first accessed by another class.&lt;br /&gt;&lt;br /&gt;The verifier permits only some bytecode sequences in valid programs, e.g. a jump (branch) instruction can only target an instruction within the same function or method. Because of this, the fact that JVM is a stack architecture does not imply a speed penalty for emulation on register-based architectures when using a JIT compiler. In the face of the code-verified JVM architecture, it makes no difference to a JIT compiler whether it gets named imaginary registers or imaginary stack positions that need to be allocated to the target architecture&#39;s registers. In fact, code verification makes the JVM different from a classic stack architecture whose efficient emulation with a JIT compiler is more complicated and typically carried out by a slower interpreter.&lt;br /&gt;&lt;br /&gt;Code verification also ensures that arbitrary bit patterns cannot get used as an address. Memory protection is achieved without the need for a Memory management unit (MMU). Thus, JVM is an efficient way of getting memory protection on simple architectures that lack an MMU. This is analogous to managed code in Microsoft&#39;s .NET Common Language Runtime, and conceptually similar to capability architectures such as the Plessey 250, and IBM System/38.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bytecode instructions&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The JVM has instructions for the following groups of tasks:&lt;br /&gt;&lt;br /&gt;Load and store &lt;br /&gt;Arithmetic &lt;br /&gt;Type conversion &lt;br /&gt;Object creation and manipulation &lt;br /&gt;Operand stack management (push / pop) &lt;br /&gt;Control transfer (branching) &lt;br /&gt;Method invocation and return &lt;br /&gt;Throwing exceptions &lt;br /&gt;Monitor-based concurrency &lt;br /&gt;The aim is binary compatibility. Each particular host operating system needs its own implementation of the JVM and runtime. These JVMs interpret the byte code semantically the same way, but the actual implementation may be different. More complicated than just the emulation of bytecode is compatible and efficient implementation of the Java core API which has to be mapped to each host operating system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Secure execution of remote code&lt;/strong&gt;&lt;br /&gt;A virtual machine architecture allows very fine-grained control over the actions that code within the machine is permitted to take. This is designed to allow safe execution of untrusted code from remote sources, a model used by Java applets. Applets run within a VM incorporated into a user&#39;s browser, executing code downloaded from a remote HTTP server. The remote code runs in a restricted &quot;sandbox&quot;, which is designed to protect the user from misbehaving or malicious code. Publishers can purchase a certificate with which to digitally sign applets as &quot;safe&quot;, giving them permission to ask the user to break out of the sandbox and access the local file system and network...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C to bytecode compilers&lt;/strong&gt;&lt;br /&gt;From the point of view of a compiler, Java bytecode is just another processor with an instruction set for which code can be generated. The JVM was originally designed to execute programs written in the Java language. However, the JVM provides an execution environment in the form of a bytecode instruction set and a runtime system that is general enough that it can be used as the target for compilers of other languages.&lt;br /&gt;&lt;br /&gt;Because of its close association with Java the JVM performs the runtime checks mandated by the Java specification. This can make it technically difficult to translate C code (which is much more lax with regard to runtime checking) to the JVM and expect it to run without issuing any warnings.&lt;br /&gt;&lt;br /&gt;It can be easier to translate some language, such as C, to machine language first before converting to Java bytecode. This has been shown to be the case with NestedVM project and accompanying paper.&lt;br /&gt;&lt;br /&gt;Compilers targeting many different languages, including Ada and COBOL, have been written</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/3022200411745599100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/3022200411745599100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/3022200411745599100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/3022200411745599100'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/09/java-virtual-machine.html' title='JAVA VIRTUAL MACHINE'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-4670830262133880753</id><published>2008-09-07T08:55:00.000-07:00</published><updated>2008-09-07T09:00:06.218-07:00</updated><title type='text'>JAVA DEVELOPMENT KIT</title><content type='html'>The Java Development Kit (JDK) is a Sun Microsystems product aimed at Java developers. Since the introduction of Java, it has been by far the most widely used Java SDK. On 17 November 2006, Sun announced that it would be released under the GNU General Public License (GPL), thus making it free software. This happened in large part on 8 May 2007 and the source code was contributed to the OpenJDK.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;JDK contents&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The primary components of the JDK are a selection of programming tools, including:&lt;br /&gt;&lt;br /&gt;java – The loader for Java applications. This tool is an interpreter and can interpret the class files generated by the javac compiler. Now a single launcher is used for both development and deployment. The old deployment launcher, jre, is no longer provided with Sun JDK. &lt;br /&gt;javac – The compiler, which converts source code into Java bytecode &lt;br /&gt;jar – The archiver, which packages related class libraries into a single JAR file. This tool also helps manage JAR files. &lt;br /&gt;javadoc – The documentation generator, which automatically generates documentation from source code comments &lt;br /&gt;jdb – The debugger &lt;br /&gt;javap – The class file disassembler &lt;br /&gt;appletviewer – This tool can be used to run and debug Java applets without a web browser. &lt;br /&gt;javah – The C header and stub generator, used to write native methods &lt;br /&gt;extcheck – This utility can detect JAR-file conflicts. &lt;br /&gt;apt – The annotation processing tool &lt;br /&gt;jhat – (Experimental) Java heap analysis tool &lt;br /&gt;jstack – (Experimental) This utility prints Java stack traces of Java threads. &lt;br /&gt;jstat – (Experimental) Java Virtual Machine statistics monitoring tool &lt;br /&gt;jstatd – (Experimental) jstat daemon &lt;br /&gt;jinfo – (Experimental) This utility gets configuration information from a running Java process or crash dump. &lt;br /&gt;jmap – (Experimental) This utility outputs the memory map for Java and can print shared object memory maps or heap memory details of a given process or core dump. &lt;br /&gt;idlj – The IDL-to-Java compiler. This utility generates Java bindings from a given IDL file. &lt;br /&gt;policytool – The policy creation and management tool, which can determine policy for a Java runtime, specifying which permissions are available for code from various sources &lt;br /&gt;VisualVM – visual tool integrating several commandline JDK tools and lightweight performance and memory profiling capabilities &lt;br /&gt;The JDK also comes with a complete Java Runtime Environment, usually called a private runtime. It consists of a Java Virtual Machine and all of the class libraries that will be present in the production environment, as well as additional libraries only useful to developers, such as the internationalization libraries and the IDL libraries.&lt;br /&gt;&lt;br /&gt;Also included are a wide selection of example programs demonstrating the use of almost all portions of the Java API.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Ambiguity between a JDK and an SDK&lt;/strong&gt;&lt;br /&gt;The JDK is a subset of what is loosely defined as a Software development kit (SDK) in the general sense. In the descriptions which accompany their recent releases for Java SE, EE, and ME, Sun acknowledge that under their terminology, the JDK forms the subset of the SDK which is responsible for the writing and running of Java programs.[citation needed] The remainder of the SDK is composed of extra software, such as Application Servers, Debuggers, and Documentation.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/4670830262133880753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/4670830262133880753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4670830262133880753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4670830262133880753'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/09/java-development-kit.html' title='JAVA DEVELOPMENT KIT'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-1257629468027450841</id><published>2008-09-04T07:56:00.000-07:00</published><updated>2008-09-04T08:14:02.893-07:00</updated><title type='text'>JAVA SCRIPT</title><content type='html'>JavaScript is a scripting language most often used for client-side web development. It was the originating dialect of the ECMAScript standard. It is a dynamic, weakly typed, prototype-based language with first-class functions. JavaScript was influenced by many languages and was designed to look like Java, but be easier for non-programmers to work with.&lt;br /&gt;&lt;br /&gt;Although best known for its use in websites (as client-side JavaScript), JavaScript is also used to enable scripting access to objects embedded in other applications (see below).&lt;br /&gt;&lt;br /&gt;JavaScript, despite the name, is essentially unrelated to the Java programming language, although both have the common C syntax, and JavaScript copies many Java names and naming conventions. The language was originally named &quot;LiveScript&quot; but was renamed in a co-marketing deal between Netscape and Sun, in exchange for Netscape bundling Sun&#39;s Java runtime with their then-dominant browser. The key design principles within JavaScript are inherited from the Self and Scheme programming languages.&lt;br /&gt;&lt;br /&gt;&quot;JavaScript&quot; is a trademark of Sun Microsystems. It was used under license for technology invented and implemented by Netscape Communications and current entities such as the Mozilla Foundation.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;History and naming&lt;/strong&gt;&lt;br /&gt;JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, which was later renamed to LiveScript, and finally to JavaScript. The change of name from LiveScript to JavaScript roughly coincided with Netscape adding support for Java technology in its Netscape Navigator web browser. JavaScript was first introduced and deployed in the Netscape browser version 2.0B3 in December 1995. The naming has caused confusion, giving the impression that the language is a spin-off of Java, and it has been characterized by many as a marketing ploy by Netscape to give JavaScript the cachet of what was then the hot new web-programming language.&lt;br /&gt;&lt;br /&gt;Microsoft named its dialect of the language JScript to avoid trademark issues. JScript was first supported in Internet Explorer version 3.0, released in August 1996, and it included Y2K-compliant date functions, unlike those based on java.util.Date in JavaScript at the time. The dialects are perceived to be so similar that the terms &quot;JavaScript&quot; and &quot;JScript&quot; are often used interchangeably (including in this article). Microsoft, however, notes dozens of ways in which JScript is not ECMA compliant.&lt;br /&gt;&lt;br /&gt;Netscape submitted JavaScript to Ecma International for standardization resulting in the standardized version named ECMAScript.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;br /&gt;Structured programming&lt;br /&gt;JavaScript supports all the structured programming syntax in C (e.g., if statements, while loops, switch statements, etc.). One partial exception is scoping: C-style block-level scoping is not supported. JavaScript 1.7, however, supports block-level scoping with the let keyword. Like C, JavaScript makes a distinction between expressions and statements.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dynamic programming&lt;/strong&gt;&lt;br /&gt;dynamic typing &lt;br /&gt;As in most scripting languages, types are associated with values, not variables. For example, a variable x could be bound to a number, then later rebound to a string. JavaScript supports various ways to test the type of an object, including duck typing.&lt;br /&gt;objects as associative arrays &lt;br /&gt;JavaScript is heavily object-based. Objects are associative arrays, augmented with prototypes (see below). Object property names are associative array keys: obj.x = 10 and obj[&quot;x&quot;] = 10 are equivalent, the dot notation being merely syntactic sugar. Properties and their values can be added, changed, or deleted at run-time. The properties of an object can also be enumerated via a for...in loop. &lt;br /&gt;run-time evaluation &lt;br /&gt;JavaScript includes an eval function that can execute statements provided as strings at run-time. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Function-level programming&lt;/strong&gt;&lt;br /&gt;first-class functions &lt;br /&gt;Functions are first-class; they are objects themselves. As such, they have properties and can be passed around and interacted with like any other object. &lt;br /&gt;inner functions and closures &lt;br /&gt;Inner functions (functions defined within other functions) are created each time the outer function is invoked, and variables of the outer functions for that invocation continue to exist as long as the inner functions still exist, even after that invocation is finished (e.g. if the inner function was returned, it still has access to the outer function&#39;s variables) — this is the mechanism behind closures within JavaScript. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Prototype-based&lt;/strong&gt;&lt;br /&gt;prototypes &lt;br /&gt;JavaScript uses prototypes instead of classes for defining object properties, including methods, and inheritance. It is possible to simulate many class-based features with prototypes in JavaScript. &lt;br /&gt;functions as object constructors &lt;br /&gt;Functions double as object constructors along with their typical role. Prefixing a function call with new creates a new object and calls that function with its local this keyword bound to that object for that invocation. The function&#39;s prototype property determines the new object&#39;s prototype. &lt;br /&gt;functions as methods &lt;br /&gt;Unlike many object-oriented languages, there is no distinction between a function definition and a method definition. Rather, the distinction occurs during function calling; a function can be called as a method. When a function is invoked as a method of an object, the function&#39;s local this keyword is bound to that object for that invocation.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Use in web pages&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The primary use of JavaScript is to write functions that are embedded in or included from HTML pages and interact with the Document Object Model (DOM) of the page. Some simple examples of this usage are:&lt;br /&gt;&lt;br /&gt;Opening or popping up a new window with programmatic control over the size, position, and attributes of the new window (i.e. whether the menus, toolbars, etc. are visible). &lt;br /&gt;Validation of web form input values to make sure that they will be accepted before they are submitted to the server. &lt;br /&gt;Changing images as the mouse cursor moves over them: This effect is often used to draw the user&#39;s attention to important links displayed as graphical elements. &lt;br /&gt;Because JavaScript code can run locally in a user&#39;s browser (rather than on a remote server) it can respond to user actions quickly, making an application feel more responsive. Furthermore, JavaScript code can detect user actions which HTML alone cannot, such as individual keystrokes. Applications such as Gmail take advantage of this: much of the user-interface logic is written in JavaScript, and JavaScript dispatches requests for information (such as the content of an e-mail message) to the server. The wider trend of Ajax programming similarly exploits this strength.&lt;br /&gt;&lt;br /&gt;A JavaScript engine (also known as JavaScript interpreter or JavaScript implementation) is an interpreter that interprets JavaScript source code and executes the script accordingly. The first ever JavaScript engine was created by Brendan Eich at Netscape Communications Corporation, for the Netscape Navigator web browser. The engine, code-named SpiderMonkey, is implemented in C. It has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 3. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Rhino, like SpiderMonkey, is ECMA-262 Edition 3 compliant.&lt;br /&gt;&lt;br /&gt;The most common host environment for JavaScript is by far a web browser. Web browsers typically use the public API to create &quot;host objects&quot; responsible for reflecting the DOM into JavaScript. The web server is another common application of the engine. A JavaScript webserver would expose host objects representing an HTTP request and response objects, which a JavaScript program could then manipulate to dynamically generate web pages.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Debugging&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Within JavaScript, access to a debugger becomes invaluable when developing large, non-trivial programs. Because there can be implementation differences between the various browsers (particularly within the Document Object Model) it is useful to have access to a debugger for each of the browsers a web application is being targeted at.&lt;br /&gt;&lt;br /&gt;Currently, Internet Explorer, Firefox, Safari, and Opera all have script debuggers available for them.&lt;br /&gt;&lt;br /&gt;Internet Explorer has three debuggers available for it: Microsoft Visual Studio is the richest of the three, closely followed by Microsoft Script Editor (a component of Microsoft Office[31]), and finally the free Microsoft Script Debugger which is far more basic than the other two. The free Microsoft Visual Web Developer Express provides a limited version of the JavaScript debugging functionality in Microsoft Visual Studio.&lt;br /&gt;&lt;br /&gt;Web applications within Firefox can be debugged using the Firebug plug-in, or the older Venkman debugger, which also works with the Mozilla browser. Firefox also has a simpler built-in Error Console, which logs JavaScript and CSS errors and warnings.&lt;br /&gt;&lt;br /&gt;Drosera is a debugger for the WebKit engine[32] on Macintosh and Windows[33] powering Apple&#39;s Safari.&lt;br /&gt;&lt;br /&gt;There are also some free tools such as JSLint, a code quality tool that will scan JavaScript code looking for problems[34], as well as a non-free tool called SplineTech JavaScript HTML Debugger.[35]&lt;br /&gt;&lt;br /&gt;Since JavaScript is interpreted, loosely-typed, and may be hosted in varying environments, each with their own compatibility differences, a programmer has to take extra care to make sure the code executes as expected in as wide a range of circumstances as possible, and that functionality degrades gracefully when it does not.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/1257629468027450841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/1257629468027450841' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/1257629468027450841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/1257629468027450841'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/09/java-script.html' title='JAVA SCRIPT'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-2003398660691926228</id><published>2008-09-02T02:05:00.000-07:00</published><updated>2008-09-02T02:10:21.978-07:00</updated><title type='text'>JOIN JAVA</title><content type='html'>Join Java is a programming language that extends the standard Java programming language with the Join Semantics of the Join Calculus. It was written at the University of South Australia within the Reconfigurable Computing Lab by Dr. Von Itzstein.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Language characteristics:&lt;/strong&gt;&lt;br /&gt;The Join Java extension introduces three new language constructs:&lt;br /&gt;&lt;br /&gt;Join methods &lt;br /&gt;Asynchronous methods &lt;br /&gt;Order class modifiers for determining the order that patterns are matched &lt;br /&gt;&lt;br /&gt;Concurrency expression in most popular programming languages is still quite low level and based on constructs such as semaphores and monitors, that have not changed in twenty years. Libraries that are emerging (such as the Java concurrency library JSR-166) show that programmers demand that higher-level concurrency semantics be available in mainstream languages. Communicating Sequential Processes (CSP), Calculus of Communicating Systems (CCS) and Pi have higher-level synchronization behaviours defined implicitly through the composition of events at the interfaces of concurrent processes. Join calculus, on the other hand has explicit synchronization based on a localized conjunction of events defined as reduction rules. The Join semantics appear to be more appropriate to mainstream programmers; who want explicit expressions of synchronization that do not breach the object-oriented idea of modularization. Join readily expresses the dynamic creation and destruction of processes and channels which is sympathetic to dynamic languages like Java.&lt;br /&gt;&lt;br /&gt;The Join Java language can express virtually all published concurrency patterns without explicit recourse to low-level monitor calls. In general, Join Java programs are more concise than their Java equivalents. The overhead introduced in Join Java by the higher-level expressions derived from the Join calculus is manageable. The synchronization expressions associated with monitors (wait and notify) which are normally located in the body of methods can be replaced by Join Java expressions (the Join methods) which form part of the method signature.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/2003398660691926228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/2003398660691926228' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/2003398660691926228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/2003398660691926228'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/09/join-java.html' title='JOIN JAVA'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-1957788679996754426</id><published>2008-08-31T10:19:00.000-07:00</published><updated>2008-08-31T10:26:58.806-07:00</updated><title type='text'>JAVA AND C SHARP COMPARISON</title><content type='html'>This is a comparison of the C# programming language with the Java programming language. As the two are both garbage-collected runtime-compiled languages with syntax derived from C and C++, there are many similarities between Java and C#. However, there are also many differences, with C# being described as a hybrid of C++ and Java, with additional new features and changes. This page documents the strong general similarities of the languages and then points out those instances where the languages differ.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Object handling&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Both C# and Java are designed from the ground up as VMT-based object oriented languages, with a syntax similar to C++. (C++ in turn is derived from C.) Neither language is a superset of C or C++, however. Both use garbage collection as a means of reclaiming memory resources, rather than explicit deallocation of memory. Both include thread synchronization mechanisms as part of their language syntax.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;C# allows restricted use of pointers. Pointers and arithmetic are potentially unsafe in a managed environment as they can be used to bypass the strict rules for object access. C# addresses that concern by requiring that code blocks or methods that use the feature be marked with the unsafe keyword, so that all clients of such code can be aware that the code may be less secure than otherwise. The compiler requires the /unsafe switch to allow compilation of a program that uses such code. Generally, unsafe code is either used to allow better interoperability with unmanaged APIs or system calls (which are inherently &quot;unsafe&quot;), or for performance reasons. Java does not allow pointers or pointer-arithmetic to be used.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Data types&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Both languages support the idea of primitive types (all of which, except for string, are value types in C#/.NET). C# has more primitive types than Java, with unsigned as well as signed integer types being supported, and a special decimal type for decimal fixed-point calculations. Java lacks unsigned types. In particular, Java lacks a primitive type for an unsigned byte. Strings are treated as (immutable) objects in both languages, but support for string literals provides a specialized means of constructing them. C# also allows verbatim strings for quotation without escape sequences, which also allow newlines.&lt;br /&gt;&lt;br /&gt;Both allow automatic boxing and unboxing to translate primitive data to and from their object form. Effectively, this makes the primitive types a subtype of the Object type. In C# this also means that primitive types can define methods, such as an override of Object&#39;s ToString() method. In Java, separate primitive wrapper classes provide such functionality, which means it requires a static call Integer.toString(42) instead of an instance call 42.ToString(). Another difference is that Java makes heavy use of boxed types in generics (see below), and as such allows an implicit unboxing conversion (in C# this requires a cast). This conversion can potentially throw a null pointer exception, which may not be obvious by code review in Java.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Value types&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;C# allows the programmer to create user-defined value types, using the struct keyword. From the programmer&#39;s perspective, they can be seen as lightweight classes. Unlike regular classes, and like the standard primitives, such value types are allocated on the stack rather than on the heap. They can also be part of an object (either as a field or boxed), or stored in an array, without the memory indirection that normally exists for class types. Structs also come with a number of limitations. Because structs have no notion of a null value and can be used in arrays without initialization, they always come with an implicit default constructor that essentially fills the struct memory space with zeroes. The programmer can only define additional constructors with one or more arguments. This also means that structs lack a virtual method table, and because of that (and the fixed memory footprint), they cannot allow inheritance (but can implement interfaces).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Enumerations&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Enumerations in C# are derived from a primitive 8, 16, 32, or 64 bit integer type. Any value of the underlying primitive type is a valid value of the enumeration type, though an explicit cast may be needed to assign it. C# also supports bitmapped enumerations where an actual value may be a combination of enumerated values bitwise or&#39;ed together. Enumerations in Java, on the other hand, are objects. The only valid values in a Java enumeration are the ones listed in the enumeration. As objects, each enumeration can contain its own fields which can be modified. Special enumeration set and map collections provide fully type-safe functionality with minimal overhead. Java enumerations allow differing method implementations for each value in the enumeration. Both C# and Java enumerations can be converted to strings and can be used in a switch statement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Arrays&lt;/strong&gt;&lt;/em&gt;Array and collection types are also given significance in the syntax of both languages, thanks to an iterator-based foreach statement loop. In C# an array corresponds to an object of the Array class, while in Java each array is a direct subclass of the Object class (but can be cast to an array of an element type that is an ancestor of its true element type), and does not implement any of the collection interfaces. C# has true multidimensional arrays, as well as the arrays-of-arrays that are available in Java (and which in C# are commonly called jagged arrays). Multidimensional arrays can in some cases increase performance because of increased locality (as there is a single pointer dereference, instead of one for every dimension of the array as is the case for jagged arrays). Another advantage is that the entire multidimensional array can be allocated with a single application of operator new, while jagged arrays require loops and allocations for every dimension. Note, though, that Java provides a syntactic construct for allocating a multidimensional jagged array with regular lengths (a rectangular array in the C# terminology); the loops and multiple allocations are then performed by the virtual machine and need not be explicit at the source level.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Inner classes&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;Both languages allow inner classes, where a class is defined entirely within another class. In Java, these classes have access to both the static and non-static members of the outer class (unless the inner class is declared static, then it only has access to the static members). Local classes can be defined within a method and have access to the method&#39;s local variables declared final, and anonymous local classes allow the creation of class instances that override some of their class methods.&lt;br /&gt;&lt;br /&gt;C# also provides inner classes, and requires an explicit reference to the outer class to its non-static members. Also, C# provides anonymous delegates as a construct that can provide access to local variables and members.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Partial classes&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;C# allows a class definition to be split across several source files using a feature called partial classes. Each part must be marked with the keyword partial. All the parts must be presented to the compiler as part of a single compilation. Parts can reference members from other parts. Parts can implement interfaces and one part can define a base class. The feature is useful in code generation scenarios where a code generator can supply one part and the developer another part to be compiled together. The developer can thus edit his part without the risk of a code generator overwriting his code at some later time. Unlike the class extension mechanism a partial class allows &quot;circular&quot; dependencies amongst its parts as they are guaranteed to be resolved at compile time. Java has no corresponding concept.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/1957788679996754426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/1957788679996754426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/1957788679996754426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/1957788679996754426'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/08/java-and-c-sharp-comparison.html' title='JAVA AND C SHARP COMPARISON'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-4219823490868611755</id><published>2008-08-28T22:52:00.000-07:00</published><updated>2008-08-28T23:01:37.082-07:00</updated><title type='text'>JAVACC</title><content type='html'>JavaCC (Java Compiler Compiler) is an open source parser generator for the Java programming language. JavaCC is similar to Yacc in that it generates a parser for a formal grammar provided in EBNF notation, except the output is Java source code. Unlike Yacc, however, JavaCC generates top-down parsers, which limits it to the LL(k) class of grammars (in particular, left recursion cannot be used). The tree builder that accompanies it, JJTree, constructs its trees from the bottom up.&lt;br /&gt;&lt;br /&gt;In 1996, Sun Microsystems released a parser generator called Jack. The developers responsible for Jack created their own company called Metamata and changed the Jack name to JavaCC. Metamata eventually became part of WebGain. After WebGain shut down its operations, JavaCC was moved to its current home.&lt;br /&gt;&lt;br /&gt;Java Compiler Compiler [tm] (JavaCC [tm]) is the most popular parser generator for use with Java [tm] applications. A parser generator is a tool that reads a grammar specification and converts it to a Java program that can recognize matches to the grammar. In addition to the parser generator itself, JavaCC provides other standard capabilities related to parser generation such as tree building (via a tool called JJTree included with JavaCC), actions, debugging, etc. &lt;br /&gt;&lt;br /&gt;JavaCC works with any Java VM version 1.2 or greater. It has been certified to be 100% Pure Java. JavaCC has been tested on countless different platforms without any special porting requirements. Given that we have seen JavaCC run on only around 5 or 6 platforms, we think this is a great testimonial to the &quot;Write Once Run Anywhere&quot; aspect of the Java programming language. We say this as engineers who have personally experienced the benefits of writing Java applications.</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/4219823490868611755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/4219823490868611755' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4219823490868611755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/4219823490868611755'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/08/javacc.html' title='JAVACC'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-161023561022306036.post-7093425641642132001</id><published>2008-06-07T22:56:00.000-07:00</published><updated>2008-06-07T23:47:07.019-07:00</updated><title type='text'>JAVA</title><content type='html'>Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems&#39; 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 that can run on any Java virtual machine (JVM) regardless of computer architecture.&lt;br /&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;br /&gt;&lt;br /&gt;History&lt;br /&gt;The Java language was created by James Gosling in June 1991 for use in one of his many set-top box projects. The language was initially called Oak, after an oak tree that stood outside Gosling&#39;s office—and also went by the name Green—and ended up later being renamed to Java, from a list of random words. Gosling&#39;s goals were to implement a virtual machine and a language that had a familiar C/C++ style of notation. The first public implementation was Java 1.0 in 1995. It promised &quot;Write Once, Run Anywhere&quot; (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 applets within web pages. Java quickly became popular. With the advent of Java 2, new versions had multiple configurations built for different types of platforms. For example, J2EE was for enterprise applications and the greatly stripped down version J2ME was for mobile applications. J2SE was the designation for the Standard Edition. In 2006, for marketing purposes, new J2 versions were renamed Java EE, Java ME, and Java SE, respectively.&lt;br /&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. Java remains a de facto standard that is controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge although they were proprietary software. Sun&#39;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) that 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;br /&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&#39;s core code open source, aside from a small portion of code to which Sun did not hold the copyright.&lt;br /&gt;&lt;br /&gt; Philosophy&lt;br /&gt; Primary goals&lt;br /&gt;There were five primary goals in the creation of the Java language:&lt;br /&gt;It should use the object-oriented programming methodology.&lt;br /&gt;It should allow the same program to be executed on multiple operating systems.&lt;br /&gt;It should contain built-in support for using computer networks.&lt;br /&gt;It should be designed to execute code from remote sources securely.&lt;br /&gt;It should be easy to use by selecting what were considered the good parts of other object-oriented languages.&lt;br /&gt;&lt;br /&gt;Platform independence&lt;br /&gt;One characteristic, platform independence, means that  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;br /&gt;This is achieved by most Java compilers by compiling the Java language code halfway (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;br /&gt;The first implementations of the language used an interpreted virtual machine to achieve portability. These implementations produced programs that ran slower 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;br /&gt;One technique, known as just-in-time compilation (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 dynamic recompilation, 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 hot spots (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;br /&gt;Another technique, commonly known as static compilation, 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;br /&gt;&lt;br /&gt; Implementations&lt;br /&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, 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;br /&gt;Sun&#39;s trademark license for usage of the Java brand insists that all implementations be &quot;compatible&quot;. 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;br /&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;br /&gt;&lt;br /&gt; Automatic memory management&lt;br /&gt;One of the ideas behind Java&#39;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;br /&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&#39;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 unreachable object is eligible for release by the Java garbage collector - it may be freed automatically by the garbage collector at any time. Memory leaks may still occur if a programmer&#39;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;br /&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;br /&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&#39;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. Additionally, the garbage collection capability demands some attention to tuning the JVM, as large heaps will cause apparently random stalls in performance.&lt;br /&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;br /&gt;&lt;br /&gt; Syntax&lt;br /&gt;The syntax of Java is largely derived from C++. 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;br /&gt;All executable statements in Java are written inside a class, including stand-alone programs.&lt;br /&gt;Source files are by convention named the same as the class they contain, appending the mandatory suffix .java. A class that is declared public is required to follow this convention. &lt;br /&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 .class appended. For class file generation, anonymous classes are treated as if their name was the concatenation of the name of their enclosing class, a $, and an integer.&lt;br /&gt;The keyword public 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;br /&gt;The keyword static indicates that the method is a static method, associated with the class rather than object instances.&lt;br /&gt;The keyword void indicates that the main method does not return any value to the caller.&lt;br /&gt;The method name &quot;main&quot; 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 main() method.&lt;br /&gt;The main method must accept an array of String objects. By convention, it is referenced as args although any other legal identifier name can be used. Since Java 5, the main method can also use variable arguments, in the form of public static void main(String... args), allowing the main method to be invoked with an arbitrary number of String arguments. The effect of this alternate declaration is semantically identical (the args parameter is still an array of String objects), but allows an alternate syntax for creating and passing the array.&lt;br /&gt;The Java launcher launches Java by loading a given class (specified on the command line) and starting its public static void main(String[]) method. Stand-alone programs must declare this method explicitly. The String[] args parameter is an array of String objects containing any arguments passed to the class. The parameters to main are often passed by means of a command line.&lt;br /&gt;The printing facility is part of the Java standard library: The System class defines a public static field called out. The out object is an instance of the PrintStream class and provides the method println(String) for displaying data to the screen while creating a new line (standard out).&lt;br /&gt;&lt;br /&gt;The import statement imports the JOptionPane class from the javax.swing package.&lt;br /&gt;The OddEven class declares a single private field of type int named input. Every instance of the OddEven class has its own copy of the input field. The private declaration means that no other class can access (read or write) the input field.&lt;br /&gt;OddEven() is a public 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. The dialog returns a String that is converted to an int by the Integer.parseInt(String) method.&lt;br /&gt;The calculate() method is declared without the static keyword. This means that the method is invoked using a specific instance of the OddEven class. (The reference used to invoke the method is passed as an undeclared parameter of type OddEven named this.) The method tests the expression input % 2 == 0 using the if keyword to see if the remainder of dividing the input field belonging to the instance of the class by two is zero. If this expression is true, then it prints Even; if this expression is false it prints Odd. (The input field can be equivalently accessed as this.input, which explicitly uses the undeclared this parameter.)&lt;br /&gt;OddEven number = new OddEven(); declares a local object reference variable in the main method named number. This variable can hold a reference to an object of type OddEven. The declaration initializes number by first creating an instance of the OddEven class, using the new keyword and the OddEven() constructor, and then assigning this instance to the variable.&lt;br /&gt;The statement number.showDialog(); calls the calculate method. The instance of OddEven object referenced by the number local variable is used to invoke the method and passed as the undeclared this parameter to the calculate method.&lt;br /&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 NumberFormatException thrown by Integer.parseInt(String).&lt;br /&gt;&lt;br /&gt;Applet&lt;br /&gt;Java applets are programs that are embedded in other applications, typically in a Web page displayed in a Web browser.&lt;br /&gt;The import statements direct the Java compiler to include the java.applet.Applet and java.awt.Graphics classes in the compilation. The import statement allows these classes to be referenced in the source code using the simple class name (i.e. Applet) instead of the fully qualified class name (i.e. java.applet.Applet).&lt;br /&gt;The Hello class extends (subclasses) the Applet class; the Applet class provides the framework for the host application to display and control the lifecycle of the applet. The Applet class is an Abstract Windowing Toolkit (AWT) Component, which provides the applet with the capability to display a graphical user interface (GUI) and respond to user events.&lt;br /&gt;The Hello class overrides the paint(Graphics) method inherited from the Container superclass to provide the code to display the applet. The paint() method is passed a Graphics object that contains the graphic context used to display the applet. The paint() method calls the graphic context drawString(String, int, int) method to display the &quot;Hello, world!&quot; string at a pixel offset of (65, 95) from the upper-left corner in the applet&#39;s display.&lt;br /&gt;An applet is placed in an HTML document using the applet HTML element. The applettag has three attributes set: code=&quot;Hello&quot; specifies the name of the Applet class and width=&quot;200&quot; height=&quot;200&quot; sets the pixel width and height of the applet. Applets may also be embedded in HTML using either the object or embed element[, although support for these elements by Web browsers is inconsistent. However, the applet tag is deprecated, so the object tag is preferred where supported.&lt;br /&gt;The host application, typically a Web browser, instantiates the Hello applet and creates an AppletContext for the applet. Once the applet has initialized itself, it is added to the AWT display hierarchy. The paint method is called by the AWT event dispatching thread whenever the display needs the applet to draw itself.&lt;br /&gt;&lt;br /&gt;Servlet&lt;br /&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;br /&gt;suport statements direct the Java compiler to include all of the public classes and interfaces from the java.io and javax.servlet packages in the compilation.&lt;br /&gt;The Hello class extends the GenericServlet class; the GenericServlet class provides the interface for the server to forward requests to the servlet and control the servlet&#39;s lifecycle.&lt;br /&gt;The Hello class overrides the service(ServletRequest, ServletResponse) method defined by the Servlet interface to provide the code for the service request handler. The service() method is passed a ServletRequest object that contains the request from the client and a ServletResponse object used to create the response returned to the client. The service() method declares that it throws the exceptions ServletException and IOException if a problem prevents it from responding to the request.&lt;br /&gt;The setContentType(String) method in the response object is called to set the MIME content type of the returned data to &quot;text/html&quot;. The getWriter() method in the response returns a PrintWriter object that is used to write the data that is sent to the client. The println(String)method is called to write the &quot;Hello, world!&quot; string to the response and then the close() 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;br /&gt; JavaServer Page&lt;br /&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;% and %&gt;. A JSP is compiled to a Java servlet, a Java application in its own right, the first time it is accessed. After that, the generated servlet creates the response.&lt;br /&gt;&lt;br /&gt; Swing application&lt;br /&gt; Swing (Java)&lt;br /&gt;Swing is a graphical user interface library for the Java SE platform. This example Swing application creates a single window with &quot;Hello, world!&quot; inside:&lt;br /&gt;&lt;br /&gt;The first import statement directs the Java compiler to include the BorderLayout class from the java.awt package in the compilation; the second import includes all of the public classes and interfaces from the javax.swing package.&lt;br /&gt;The Hello class extends the JFrame class; the JFrame class implements a window with a title bar and a close control.&lt;br /&gt;The Hello() constructor initializes the frame by first calling the superclass constructor, passing the parameter &quot;hello&quot;, which is used as the window&#39;s title. It then calls the setDefaultCloseOperation(int) method inherited from JFrame to set the default operation when the close control on the title bar is selected to WindowConstants.EXIT_ON_CLOSE — this causes the JFrame 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 BorderLayout; this tells Swing how to arrange the components that will be added to the frame. A JLabel is created for the string &quot;Hello, world!&quot; and the add(Componen) method inherited from the Container superclass is called to add the label to the frame. The pack() method inherited from the Window superclass is called to size the window and lay out its contents, in the manner indicated by the BorderLayout.&lt;br /&gt;The main() method is called by the JVM when the program starts. It instantiates a new Hello frame and causes it to be displayed by calling the setVisible(boolean) method inherited from the Component superclass with the boolean parameter true. Note that once the frame is displayed, exiting the main 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;br /&gt;&lt;br /&gt;Criticism of Java&lt;br /&gt;Java&#39;s performance has improved substantially since the early versions, and performance of JIT compilers relative to native compilers has in some tests been shown to be quite similar. 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;br /&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 looks 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, Qt Jambi or SWT may be used for increased integration with the native windowing system.&lt;br /&gt;As in C++ and some other object-oriented languages, variables of Java&#39;s primitive types were not originally 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&#39;s designers for performance reasons. Because of this, Java was 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;br /&gt;Java suppresses several features (such as operator overloading and multiple inheritance) for classes in order to simplify the language, to &quot;save the programmers from themselves&quot;, and to prevent possible errors and anti-pattern design. This has been a source of criticism, relating to a lack of low-level features, but some of these limitations may be worked around. Java interfaces have always had multiple inheritance.&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://java89.blogspot.com/feeds/7093425641642132001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/161023561022306036/7093425641642132001' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/7093425641642132001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/161023561022306036/posts/default/7093425641642132001'/><link rel='alternate' type='text/html' href='http://java89.blogspot.com/2008/06/java.html' title='JAVA'/><author><name>sumandeep</name><uri>http://www.blogger.com/profile/05209149777379524688</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>