Java is created to operate in the distributed environment on the net. It is much easier to use compared to C++. Java functions are based on the object-oriented programming model. You can use it for online video, audio, games, banking applications and chat. It is also used in various intranet applications.
Microsoft Java was first developed for Internet Explorer 3. This was the fastest implementation of JVM (Java Virtual Machine) for the first couple of years after Java release. The creator o
[ read more ]
Java and JavaScript are two different programming languages which have similar names and share similar syntax.
Java is a complete object oriented programming language which is designed to create applets or stand-alone applications.
JavaScript is a more simple programming language which is designed to create scripts for use on the World Wide Web.
Java bytecode is executed by the Java Virtual Machine. JavaScript scripts are interpreted by JavaScript-aware web browers, such as Firefox and
[ read more ]
A jar file is a Java Archive.
A jar file is a collection of class files.
The jar file standard is based upon PKZip. In fact, you can open .jar files with a normal unzip program!
A jar archive should contain a file called Manifest.mf which tells the Java Virtual Machine which class file contains the main method.
[ read more ]
An instance variable is a variable that is related to a single instance of a class. Each time an instance of a class is created, the system creates one copy of the instance variables related to that class.
An instance variable is declared inside a class, but not within a method. A variable that is defined inside a class and a method is known as a local variable.
The opposite of an instance variable is a static variable, also referred to as a class variable. A static variable exists across
[ read more ]
To promote a better experience on different websites, owners of these websites use JavaScript. However, there are instances where JavaScript gets disabled and some of the different components on the site can't be experienced because of this. Enabling JavaScript is different for each web browser, but all of it takes about a minute to complete. Once you're done, simply restart the browser and JavaScript will be enabled.
Enabling JavaScript on Internet Explorer
To enable JavaScript on I
[ read more ]
The JDK is the Java Development Kit.
The JDK consists of the Java compiler and related tools which enable users to create applications in Java.
Sun distributes the JDK as part of J2EE, J2SE, and J2ME.
Java Video Tutorial 1: Installing the Java Development Kit
This tutorial is the first of a collection of basic java video tutorials that will get you started. In this tutorial you will learn how to install the JDK on a Windows XP machine.
{youtube}v/ue3bhCZ60Jk{/youtube}
[ read more ]
Many applications require the Java Runtime Environment (JRE) to run.
The JRE must be downloaded and installed on each PC where you intend to run Java-based applications.
Steps to Install Java on Microsoft Windows
Go to the Java Software Download Page
Select the proper version of Java for your computer
Click the download button
Click run
Click run
Check I accept the terms in the license agreement
Click next
Click next
Click finish
Click yes to restart Windows now or no t
[ read more ]
Java has two groups of data types, primitive data types and object references.
Java Primitive Data Types
Data Type
Purpose
Contents
Default Value*
boolean
Truth value
true or false
fales
char
Character
Unicode characters
u0000
byte
Signed integer
8 bit two's complement
(byte) 0
short
Signed integer
16 bit two's complement
(short) 0
int
Signed integer
32 bit two's complement
0
long
Signed integer
64 bit two's complement
0L
float
Rea
[ read more ]
C++ supports pointers; Java does not (Java does have object references)
C++ supports mutiple inheritance directly; Java supports multiple inheritance only through interfaces
C++ supports operator overloading; Java does not
C++ supports global variables; Java does not (sort of)
C++ supports #define; Java does not
C++ supports typedef; Java does not
C++ supports enum; Java does not
C++ supports unions; Java does not
C++ supports structs; Java does not
C++ supports constants; J
[ read more ]
Java does not directly support constants. However, a static final variable is effectively a constant.
The static modifier causes the variable to be available without loading an instance of the class where it is defined.
The final modifier causes the variable to be unchangeable.
Naming Standards for Java Constants
Java constants are normally declared in ALL CAPS.
Underscores normally separate Words in Java constants.
Sample Java Constant Declaration
public class MAX_UNITS {
public
[ read more ]