Java Reference
In-Depth Information
Even after the novelty of Java web programming wore off, the overall benefits of the lan-
guage became clear, and the programmers stuck around. There are more professional
Java programmers today than C++ programmers.
Introduction to Java
Java is an object-oriented, platform-neutral, secure language designed to be easier to
learn than C++ and harder to misuse than C and C++.
1
Object-oriented programming (OOP) is a software development methodology in which a
program is conceptualized as a group of objects that work together. Objects are created
using templates called classes , and they contain data and the statements required to use
that data. Java is completely object-oriented, as you'll see later today when you create
your first class and use it to create objects.
Platform neutrality is the ability of a program to run without modification in different
computing environments. Java programs are compiled into a format called bytecode that
is run by any operating system, software, or device with a Java interpreter. You can cre-
ate a Java program on a Windows Vista machine that runs on a Linux web server, Apple
Mac using OS X, and Palm personal digital assistant. As long as a platform has a Java
interpreter, it can run the bytecode.
Though the ease of learning one language over another is always a point of contention
among programmers, Java was designed to be easier than C++ primarily in the following
ways:
Java automatically takes care of memory allocation and deallocation, freeing pro-
grammers from this tedious and complex task.
n
Java doesn't include pointers, a powerful feature of use primarily to experienced
programmers that can be easily misused.
n
Java includes only single inheritance in object-oriented programming.
n
The lack of pointers and the presence of automatic memory management are two key
elements to the security of Java.
Selecting a Development Tool
Now that you've been introduced to Java as a spectator, it's time to put some of these
concepts into play and create your first Java program.
Search WWH ::




Custom Search