set11 - Java Data Types Arrays, and Strings 1 Primitive...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Java Data Types Java Data Types Arrays, and Arrays, and Strings Strings
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last modified: Jan. 2001 2 Primitive Data Types (continued) Primitive Data Types (continued) Type Contains Bit size Defaul boolean true or false 1 false char Unicode character 16 \u0000 byte signed integer 8 0 short signed integer 16 0 int signed integer 32 0 long signed integer 64 0 float floating point 32 0.0 double floating point 64 0.0
Background image of page 2
Last modified: Jan. 2001 3 Primitive Data Types (continued) Primitive Data Types (continued) Each of the data types in the previous slide, except short and byte, have corresponding classes defined in the language: Boolean, Character, Integer, Long, Float, and Double Act as a “wrapper” around the primitive type. Include useful constants and methods.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last modified: Jan. 2001 4 Unicode Unicode Unicode is a 16-bit character set. Most text editors only handle ASCII. The Unicode escape sequence is \uxxxx, where xxxx is one to four hexadecimal digits. The use of Unicode is normally transparent, but is an issue when doing file I/O.
Background image of page 4
Last modified: Jan. 2001 5 Comments and javadoc Comments and javadoc Comments can be specified with: // comment /* comment */ /** documentation comment */
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Last modified: Jan. 2001 6 Arrays Arrays Although arrays are not objects, but they are treated much like objects. Manipulated by reference.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/10/2011 for the course ENEL 409 taught by Professor Moussavi during the Fall '11 term at University of Calgary.

Page1 / 20

set11 - Java Data Types Arrays, and Strings 1 Primitive...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online