Characters - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Characters

Description:

Characters. In Java single characters are represented using the data type char. Character constants are written as symbols enclosed in single quotes, for ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 8
Provided by: csMi8
Learn more at: https://www.cs.miami.edu
Category:
Tags: characters | jett

less

Transcript and Presenter's Notes

Title: Characters


1
Characters
  • In Java single characters are represented using
    the data type char. Character constants are
    written as symbols enclosed in single quotes, for
    example, 'a', 'X', and '5'.
  • To represent characters in computer, U. S.
    computer manufacturers devised several schemes
    for encoding characters as integers.
  • One coding scheme widely used today is ASCII
    (American Standard Code for Information
    Interchange).

2
ASCII Table
3
Character Translation
  • Erf out to reality ASCIITranslate.java

4
Character Comparison
  • Spling out to reality CharOrder.java

5
Special Characters
  • These are also known as escape characters
  • Written using a \ prefix
  • \t \n \b \g \ \\
  • Spling out to reality EscapeCharacters.java

6
The Character Class
  • The Character class in the java.lang package
    includes methods for manipulating character
    values.
  • Example, use isLetter to check if a character is
    a-z or A-Z
  • Zzzznicka out to reality CharGames.java

7
Unicode
  • To accommodate the character symbols of
    non-English languages, the Unicode Consortium
    established the Unicode Worldwide Character
    Standard, commonly known as Unicode.
Write a Comment
User Comments (0)
About PowerShow.com