Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Integers

Java automatically converts decimal numbers you write in your source program into binary numbers internally.

Tutorial Details:

Integers are whole numbers, for example, -35, 0, 2048, .... Integers are represented in binary inside the computer, and in decimal in Java source programs. Java automatically converts decimal numbers you write in your source program into binary numbers internally.

Four (or five) kinds of primtive integers and two integer classes.
Primitive types. The are four types of integers in Java: byte, short, int, long. The most common is int. All integers are stored in signed, two's-complement, format.

char! Technically, char is an unsigned integer type altho it is almost exclusively used to store characters. Making it integer is largely because of Java's legacy from C++. Don't use char for integers unless you are sure of what you're doing.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/data/basic_types/21integers.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Integers

View Tutorial:
Integers

Related Tutorials:

Getting started with Java 2D - JavaWorld - July 1998
Getting started with Java 2D - JavaWorld - July 1998
 
Use JNDI to share objects between different virtual machines - JavaWorld July 1999
Use JNDI to share objects between different virtual machines - JavaWorld July 1999
 
C#: A language alternative or just J--?, Part 2 - JavaWorld December 2000
C#: A language alternative or just J--?, Part 2 - JavaWorld December 2000
 
Design for performance, Part 2: Reduce object creation - JavaWorld February 2001
Design for performance, Part 2: Reduce object creation - JavaWorld February 2001
 
Reveal the magic behind subtype polymorphism - JavaWorld April 2001
Reveal the magic behind subtype polymorphism - JavaWorld April 2001
 
Object-oriented language basics, Part 7
Object-oriented language basics, Part 7
 
Transaction and redelivery in JMS
Transaction and redelivery in JMS
 
Java scripting languages: Which is right for you?
Java scripting languages: Which is right for you?
 
J2ME devices: Real-world performance
J2ME devices: Real-world performance
 
Sort it out
Sort it out
 
Axis-orizing objects for SOAP
Axis-orizing objects for SOAP
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.