您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)


Content Index

Content Page # 31

Some primitive data types available in Java

As well as having an identifier (name), variables have a type. We have already encountered `int' (an integer). Below is a list of the most important primitive types. By primitive it is meant 'built into the language'.

  • int: an integer.
  • float, double: approximate real numbers.
  • char: a single character.
  • byte: a byte.
  • boolean: true or false.

A quick recap of some high school mathematics: an integer is a whole number (e.g., 3, 0, -1000) and a real number is one that can have a fractional component (e.g., 3.1, -32.6)

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg