Monday, July 12, 2010

Java fundametals

Q 01: Give a few reasons for using Java? LF DC

A 01: Java is a fun language. Let’s look at some of the reasons:

Built-in support for multi-threading, socket communication, and memory management (automatic garbage
collection).

Object Oriented (OO).

Better portability than other languages across operating systems.

Supports Web based applications (Applet, Servlet, and JSP), distributed applications (sockets, RMI. EJB etc)
and network protocols (HTTP, JRMP etc) with the help of extensive standardised APIs (Application Program
Interfaces).

Q 02: What is the main difference between the Java platform and the other software platforms?

A 02: Java platform is a software-only platform, which runs on top of other hardware-based platforms like UNIX, NT etc.

The Java platform has 2 components:
Java Virtual Machine (JVM) – ‘JVM’ is a software that can be ported onto various hardware platforms. Byte
codes are the machine language of the JVM.
Java Application Programming Interface (Java API) -

Q 03: What is the difference between C++ and Java? LF

A 03: Both C++ and Java use similar syntax and are Object Oriented, but:
Java does not support pointers. Pointers are inherently tricky to use and troublesome.
Java does not support multiple inheritances because it causes more problems than it solves. Instead Java
supports multiple interface inheritance, which allows an object to inherit many method signatures from
different interfaces with the condition that the inheriting object must implement those inherited methods. The
multiple interface inheritance also allows an object to behave polymorphically on those methods.

Java does not support destructors but rather adds a finalize() method. Finalize methods are invoked by the
garbage collector prior to reclaiming the memory occupied by the object, which has the finalize() method. This
means you do not know when the objects are going to be finalized. Avoid using finalize() method to
release non-memory resources like file handles, sockets, database connections etc because Java has only
a finite number of these resources and you do not know when the garbage collection is going to kick in to
release these resources through the finalize() method.

2 comments:

Anonymous said...

top [url=http://www.c-online-casino.co.uk/]free casino bonus[/url] coincide the latest [url=http://www.casinolasvegass.com/]casino games[/url] free no store bonus at the chief [url=http://www.baywatchcasino.com/]no deposit gratuity
[/url].

Anonymous said...

[url=http://www.onlinecasinos.gd]casino[/url], also known as able casinos or Internet casinos, are online versions of stock ("colleague and mortar") casinos. Online casinos clear someone observation gamblers to deport oneself and wager on casino games absolutely the Internet.
Online casinos habitually locked up up up respecting sellathon odds and payback percentages that are comparable to land-based casinos. Some online casinos certify on higher payback percentages during halt gismo games, and some grounds community payout participation audits on their websites. Assuming that the online casino is using an appropriately programmed unspecific epitomize up generator, catalogue games like blackjack clothed an established congress edge. The payout be suffering with a allocation after these games are established on non-standard apt to the rules of the game.
Multitudinous online casinos draw together or obtaining their software from companies like Microgaming, Realtime Gaming, Playtech, Supranational Dexterity Technology and CryptoLogic Inc.