Tuesday, May 3, 2011

JAVA TYPES

Every programming language defines a set of data types that it recognizes. In the case of early FORTRAN,
the language only recognized integers and floating-point numbers. More modern languages recognize a wider
range of data types, such as numbers of different levels of precision, true-or-false values, and strings of alphanumeric
characters. Most modern languages also allow the programmer to define new types of data.
Java is an object-oriented language, which means that the Java language operates on software objects. The idea
of a software object is a modern idea, and object orientation means that the programmer can define a new type of
data element by defining a new class. Having defined a new class (e.g., automobile), the programmer can create
an example object of the class (called an instance of a class; e.g., a Ford Mustang with a particular vehicle ID) and
manipulate it as a unique object. This means that programs are not limited to computing numbers, strings of
characters, etc. Programs can also compute automobiles, factory orders, concert schedules, etc. directly.

No comments:

Post a Comment