lec17Feb1108

lec17Feb1108 - Lecture 17 February 11, 08 Characters A...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 17 February 11, 08 Characters A primitive type Single character value char ch = a char ch = \u039A boolean isLetter(char ch) Determines if specified char value is a letter boolean isDigit(char ch) Determines if specified char value is a digit boolean isWhiteSpace(char ch) Determines if specified char value is white space boolean isUpperCase(char ch) Determines if specified char value is uppercase boolean isLowerCase(char ch) char toUpperCase(char ch) char toLowerCase(char ch) Returns the uppercase or lowercase form of the specified char value respectively toString(char ch) Returns a String object representing the specified character value Strings Consists of a sequence of characters Are objects Provided by Java Platform Creating Strings String variableName = stringLiteral e.g. String str = Hello!; (Or) Use the new keyword and a constructor The String class provides you with 11 constructors!...
View Full Document

This note was uploaded on 04/14/2008 for the course COMP 202 taught by Professor Verbrugge during the Winter '07 term at McGill.

Page1 / 13

lec17Feb1108 - Lecture 17 February 11, 08 Characters A...

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