JAVA.LANG.CHARACTER CLASS

Similar documents
JAVA.LANG.INTEGER CLASS

GUAVA - CHARMATCHER CLASS

Java Programming Lecture 10

CS-201 Introduction to Programming with Java

use Unicode::UCD qw(charscript charinrange); my $range = charscript($script); print "looks like $script\n" if charinrange($range, $codepoint);

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

An Introduction to Processing

Computational Expression

Class Library java.lang Package. Bok, Jong Soon

Proposed Update Unicode Standard Annex #9

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

JAVA.IO.FILE CLASS. static String pathseparator -- This is the system-dependent path-separator character, represented as a string for convenience.

CS107, Lecture 3 Bits and Bytes; Bitwise Operators

Basic data types. Building blocks of computation

Jekejeke Runtime Reference

Java Classes: Math, Integer A C S L E C T U R E 8

6.096 Introduction to C++ January (IAP) 2009

Number Representation & Conversion

Chapter 2 Elementary Programming

Basics of the Unicode BiDirectional Algorithm (UBDA)

Getting started with Java

Datatypes, Variables, and Operations

Data types Expressions Variables Assignment. COMP1400 Week 2

Unicode Standard Annex #9

Proposed Update Unicode Standard Annex #9

Introduction to Programming Using Java (98-388)

1 class Lecture2 { 2 3 "Elementray Programming" / References 8 [1] Ch. 2 in YDL 9 [2] Ch. 2 and 3 in Sharan 10 [3] Ch.

Zheng-Liang Lu Java Programming 45 / 79

CS2141 Software Development using C/C++ C++ Basics

Assoc. Prof. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Proposed Update Unicode Standard Annex #9

Eng. Mohammed Abdualal

UNICODE BIDIRECTIONAL ALGORITHM

Chapter 4: Computer Codes. In this chapter you will learn about:

CS107, Lecture 3 Bits and Bytes; Bitwise Operators

VARIABLES AND TYPES CITS1001

Inheritance, Polymorphism and the Object Memory Model

Assoc. Prof. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

SOFTWARE DEVELOPMENT 1. Strings and Enumerations 2018W A. Ferscha (Institute of Pervasive Computing, JKU Linz)

Lesson 2A Data. Data Types, Variables, Constants, Naming Rules, Limits. A Lesson in Java Programming

Java Basic Datatypees

Java characters Lecture 8

1 Shyam sir JAVA Notes

CSE P 501 Compilers. Java Implementation JVMs, JITs &c Hal Perkins Winter /11/ Hal Perkins & UW CSE V-1

Formatted Output Pearson Education, Inc. All rights reserved.

boolean, char, class, const, double, else, final, float, for, if, import, int, long, new, public, return, static, throws, void, while

String is one of mostly used Object in Java. And this is the reason why String has unique handling in Java(String Pool). The String class represents

CSCI 2010 Principles of Computer Science. Data and Expressions 08/09/2013 CSCI

If you haven't already, before reading this document, you should become familiar with both perlunitut and perluniintro.

Primitive Data Types: Intro

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...

c) And last but not least, there are javadoc comments. See Weiss.

2/29/2016. Definition: Computer Program. A simple model of the computer. Example: Computer Program. Data types, variables, constants

COMP Primitive and Class Types. Yi Hong May 14, 2015

BASIC COMPUTATION. public static void main(string [] args) Fundamentals of Computer Science I

Agenda. CSE P 501 Compilers. Java Implementation Overview. JVM Architecture. JVM Runtime Data Areas (1) JVM Data Types. CSE P 501 Su04 T-1

JAVA MOCK TEST JAVA MOCK TEST II

Agenda CS121/IS223. Reminder. Object Declaration, Creation, Assignment. What is Going On? Variables in Java

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Java Classes & Primitive Types

Exercises Software Development I. 03 Data Representation. Data types, range of values, internal format, literals. October 22nd, 2014

Java Classes & Primitive Types

Program Fundamentals

CS260 Intro to Java & Android 03.Java Language Basics

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

CHAPTER 5 VARIABLES AND OTHER BASIC ELEMENTS IN JAVA PROGRAMS

CS 261 Fall Mike Lam, Professor Integer Encodings

5/3/2006. Today! HelloWorld in BlueJ. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont. HelloWorld in BlueJ, Cont.

CS162: Introduction to Computer Science II. Primitive Types. Primitive types. Operations on primitive types. Limitations

Basis Technology Unicode 対応ライブラリスペックシート

CSE115 / CSE503 Introduction to Computer Science I. Dr. Carl Alphonce 343 Davis Hall Office hours:

More About Objects and Methods. Objectives. Outline. Chapter 6

More About Objects and Methods

Objectives. Connecting with Computer Science 2

Comments in a Java Program. Java Overview. Identifiers. Identifier Conventions. Primitive Data Types and Declaring Variables

CS121/IS223. Object Reference Variables. Dr Olly Gotel

1B1b Classes in Java Part I

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

Important Java terminology

Lecture 3. COMP1006/1406 (the Java course) Summer M. Jason Hinek Carleton University

CSE 1320 INTERMEDIATE PROGRAMMING - OVERVIEW AND DATA TYPES

More on variables and methods

Exam 1 Prep. Dr. Demetrios Glinos University of Central Florida. COP3330 Object Oriented Programming

CMPT 125: Lecture 3 Data and Expressions

Data and Expressions. Outline. Data and Expressions 12/18/2010. Let's explore some other fundamental programming concepts. Chapter 2 focuses on:

CS 2340 Objects and Design - Scala

CSB541 Network Programming 網路程式設計. Ch.2 Streams 吳俊興國立高雄大學資訊工程學系

CS162: Introduction to Computer Science II

CS 430 Spring Mike Lam, Professor. Data Types and Type Checking

EDAN20 Language Technology Chapter 3: Encoding and Annotation Schemes

Variables and Data Representation

World Inside a Computer is Binary

Basics of Java Programming

In this chapter you ll learn:

CHAPTER 7 OBJECTS AND CLASSES

Data Types, Variables and Arrays. OOC 4 th Sem, B Div Prof. Mouna M. Naravani

These are reserved words of the C language. For example int, float, if, else, for, while etc.

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

C# MOCK TEST C# MOCK TEST I

A variable is a name for a location in memory A variable must be declared

Transcription:

JAVA.LANG.CHARACTER CLASS http://www.tutorialspoint.com/java/lang/java_lang_character.htm Copyright tutorialspoint.com Introduction The java.lang.character class wraps a value of the primitive type char in an object. An object of type Character contains a single field whose type is char. Class declaration Following is the declaration for java.lang.character class: public final class Character extends Object implements Serializable, Comparable<Character> Field Following are the fields for java.lang.character class: static byte COMBINING_SPACING_MARK -- This is the General category "Mc" in the Unicode static byte CONNECTOR_PUNCTUATION -- This is the General category "Pc" in the Unicode static byte CONTROL -- This is the General category "Cc" in the Unicode static byte CURRENCY_SYMBOL -- This is the General category "Sc" in the Unicode static byte DASH_PUNCTUATION -- This is the General category "Pd" in the Unicode static byte DECIMAL_DIGIT_NUMBER -- This is the General category "Nd" in the Unicode static byte DIRECTIONALITY_ARABIC_NUMBER -- This is the Weak bidirectional character type "AN" in the Unicode static byte DIRECTIONALITY_BOUNDARY_NEUTRAL -- This is the Weak bidirectional character type "BN" in the Unicode static byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR -- This is the Weak bidirectional character type "CS" in the Unicode static byte DIRECTIONALITY_EUROPEAN_NUMBER -- This is the Weak bidirectional character type "EN" in the Unicode static byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR -- This is the Weak bidirectional character type "ES" in the Unicode static byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR -- This is the Weak bidirectional character type "ET" in the Unicode static byte DIRECTIONALITY_LEFT_TO_RIGHT -- This is the Strong bidirectional character type "L" in the Unicode static byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING -- This is the Strong bidirectional character type "LRE" in the Unicode static byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE -- This is the Strong bidirectional character type "LRO" in the Unicode

static byte DIRECTIONALITY_NONSPACING_MARK -- This is the Weak bidirectional character type "NSM" in the Unicode static byte DIRECTIONALITY_OTHER_NEUTRALS -- This is the Neutral bidirectional character type "ON" in the Unicode static byte DIRECTIONALITY_PARAGRAPH_SEPARATOR -- This is the Neutral bidirectional character type "B" in the Unicode static byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT -- This is the Weak bidirectional character type "PDF" in the Unicode static byte DIRECTIONALITY_RIGHT_TO_LEFT -- This is the Strong bidirectional character type "R" in the Unicode static byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC -- This is the Strong bidirectional character type "AL" in the Unicode static byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING -- This is the Strong bidirectional character type "RLE" in the Unicode static byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE -- This is the Strong bidirectional character type "RLO" in the Unicode static byte DIRECTIONALITY_SEGMENT_SEPARATOR -- This is the Neutral bidirectional character type "S" in the Unicode static byte DIRECTIONALITY_UNDEFINED -- This is the Undefined bidirectional character type. static byte DIRECTIONALITY_WHITESPACE -- This is the Neutral bidirectional character type "WS" in the Unicode static byte ENCLOSING_MARK -- This is the General category "Me" in the Unicode static byte END_PUNCTUATION -- This is the General category "Pe" in the Unicode static byte FINAL_QUOTE_PUNCTUATION -- This is the General category "Pf" in the Unicode static byte FORMAT -- This is the General category "Cf" in the Unicode static byte INITIAL_QUOTE_PUNCTUATION -- This is the General category "Pi" in the Unicode static byte LETTER_NUMBER -- This is the General category "Nl" in the Unicode static byte LINE_SEPARATOR -- This is the General category "Zl" in the Unicode static byte LOWERCASE_LETTER -- This is the General category "Ll" in the Unicode static byte MATH_SYMBOL -- This is the General category "Sm" in the Unicode static int MAX_CODE_POINT -- This is the maximum value of a Unicode code point. static char MAX_HIGH_SURROGATE -- This is the maximum value of a Unicode highsurrogate code unit in the UTF-16 encoding. static char MAX_LOW_SURROGATE -- This is the maximum value of a Unicode lowsurrogate code unit in the UTF-16 encoding. static int MAX_RADIX -- This is the maximum radix available for conversion to and from

strings. static char MAX_SURROGATE -- This is the maximum value of a Unicode surrogate code unit in the UTF-16 encoding. static char MAX_VALUE -- This is the constant value of this field is the largest value of type char, '\uffff'. static int MIN_CODE_POINT -- This is the minimum value of a Unicode code poin static char MIN_HIGH_SURROGATE -- This is the minimum value of a Unicode highsurrogate code unit in the UTF-16 encoding. static char MIN_LOW_SURROGATE -- This is the minimum value of a Unicode lowsurrogate code unit in the UTF-16 encoding. static int MIN_RADIX -- This is the minimum radix available for conversion to and from strings. static int MIN_SUPPLEMENTARY_CODE_POINT -- This is the minimum value of a supplementary code point. static char MIN_SURROGATE -- This is the minimum value of a Unicode surrogate code unit in the UTF-16 encoding. static char MIN_VALUE -- This is the constant value of this field is the smallest value of type char, '\u0000'. static byte MODIFIER_LETTER -- This is the General category "Lm" in the Unicode static byte MODIFIER_SYMBOL -- This is the General category "Sk" in the Unicode static byte NON_SPACING_MARK -- This is the General category "Mn" in the Unicode static byte OTHER_LETTER -- This is the General category "Lo" in the Unicode static byte OTHER_NUMBER -- This is the General category "No" in the Unicode static byte OTHER_PUNCTUATION -- This is the General category "Po" in the Unicode static byte OTHER_SYMBOL -- This is the General category "So" in the Unicode static byte PARAGRAPH_SEPARATOR -- This is the General category "Zp" in the Unicode static byte PRIVATE_USE -- This is the General category "Co" in the Unicode static int SIZE -- This is the number of bits used to represent a char value in unsigned binary form. static byte SPACE_SEPARATOR -- This is the General category "Zs" in the Unicode static byte START_PUNCTUATION -- This is the General category "Ps" in the Unicode static byte SURROGATE -- This is the General category "Cs" in the Unicode static byte TITLECASE_LETTER -- This is the General category "Lt" in the Unicode

static Class<Character> TYPE -- This is the Class instance representing the primitive type char. static byte UNASSIGNED -- This is the General category "Cn" in the Unicode static byte UPPERCASE_LETTER -- This is the General category "Lu" in the Unicode Class constructors S.N. 1 Constructor & Description Charactercharvalue This constructs a newly allocated Character object that represents the specified char value. Class methods S.N. 1 Method & Description static int charcountintcodepoint This method determines the number of char values needed to represent the specified character Unicodecodepoint. 2 char charvalue This method returns the value of this Character object. 3 static int codepointatchar[]a, intindex This method returns the code point at the given index of the char array. 4 static int codepointatchar[]a, intindex, intlimit This method returns the code point at the given index of the char array, where only array elements with index less than limit can be used. 5 static int codepointatcharsequenceseq, intindex This method returns the code point at the given index of the CharSequence. 6 static int codepointbeforechar[]a, intindex This method returns the code point preceding the given index of the char array. 7 static int codepointbeforechar[]a, intindex, intstart This method returns the code point preceding the given index of the char array, where

only array elements with index greater than or equal to start can be used. 8 static int codepointbeforecharsequenceseq, intindex This method returns the code point preceding the given index of the CharSequence. 9 static int codepointcountchar[]a, intoffset, intcount This method returns the number of Unicode code points in a subarray of the char array argument 10 static int codepointcountcharsequenceseq, intbeginindex, intendindex This method returns the number of Unicode code points in the text range of the specified char sequence. 11 int comparetocharacteranothercharacter This method compares two Character objects numerically. 12 static int digitcharch, intradix This method returns the numeric value of the character ch in the specified radix. 13 static int digitintcodepoint, intradix This method returns the numeric value of the specified character Unicodecodepoint in the specified radix. 14 boolean equalsobjectobj This method compares this object against the specified object 15 static char fordigitintdigit, intradix This method determines the character representation for a specific digit in the specified radix. 16 static byte getdirectionalitycharch This method returns the Unicode directionality property for the given character. 17 static byte getdirectionalityintcodepoint This method returns the Unicode directionality property for the given character Unicodecodepoint. 18 static int getnumericvaluecharch

This method returns the int value that the specified Unicode character represents. 19 static int getnumericvalueintcodepoint This method returns the int value that the specified character Unicodecodepoint represents. 20 static int gettypecharch This method returns a value indicating a character's general category. 21 static int gettypeintcodepoint This method returns a value indicating a character's general category. 22 int hashcode This method returns a hash code for this Character. 23 static boolean isdefinedcharch This method determines if a character is defined in Unicode. 24 static boolean isdefinedintcodepoint This method determines if a character Unicodecodepoint is defined in Unicode. 25 static boolean isdigitcharch This method determines if the specified character is a digit. 26 static boolean isdigitintcodepoint This method determines if the specified character Unicodecodepoint is a digit. 27 static boolean ishighsurrogatecharch This method determines if the given char value is a high-surrogate code unit alsoknownasleading surrogatecodeunit. 28 static boolean isidentifierignorablecharch This method determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier. 29 static boolean isidentifierignorableintcodepoint This method determines if the specified character Unicodecodepoint should be regarded as an ignorable character in a Java identifier or a Unicode identifier.

30 static boolean isisocontrolcharch This method determines if the specified character is an ISO control character. 31 static boolean isisocontrolintcodepoint This method determines if the referenced character Unicodecodepoint is an ISO control character. 32 static boolean isjavaidentifierpartcharch This method determines if the specified character may be part of a Java identifier as other than the first character. 33 static boolean isjavaidentifierpartintcodepoint This method determines if the character Unicodecodepoint may be part of a Java identifier as other than the first character. 34 static boolean isjavaidentifierstartcharch This method determines if the specified character is permissible as the first character in a Java identifier. 35 static boolean isjavaidentifierstartintcodepoint This method determines if the character Unicodecodepoint is permissible as the first character in a Java identifier. 36 static boolean islettercharch This method determines if the specified character is a letter. 37 static boolean isletterintcodepoint This method determines if the specified character Unicodecodepoint is a letter. 38 static boolean isletterordigitcharch This method determines if the specified character is a letter or digit. 39 static boolean isletterordigitintcodepoint This method determines if the specified character Unicodecodepoint is a letter or digit. 40 static boolean islowercasecharch This method determines if the specified character is a lowercase character.

41 static boolean islowercaseintcodepoint This method determines if the specified character Unicodecodepoint is a lowercase character. 42 static boolean islowsurrogatecharch This method determines if the given char value is a low-surrogate code unit alsoknownastrailing surrogatecodeunit. 43 static boolean ismirroredcharch This method determines whether the character is mirrored according to the Unicode 44 static boolean ismirroredintcodepoint This method determines whether the specified character Unicodecodepoint is mirrored according to the Unicode 45 static boolean isspacecharcharch This method determines if the specified character is a Unicode space character. 46 static boolean isspacecharintcodepoint This method determines if the specified character Unicodecodepoint is a Unicode space character. 47 static boolean issupplementarycodepointintcodepoint This method determines whether the specified character Unicodecodepoint is in the supplementary character range. 48 static boolean issurrogatepaircharhigh, charlow This method determines whether the specified pair of char values is a valid surrogate pair. 49 static boolean istitlecasecharch This method determines if the specified character is a titlecase character. 50 static boolean istitlecaseintcodepoint This method determines if the specified character Unicodecodepoint is a titlecase character. 51 static boolean isunicodeidentifierpartcharch

This method determines if the specified character may be part of a Unicode identifier as other than the first character. 52 static boolean isunicodeidentifierpartintcodepoint This method determines if the specified character Unicodecodepoint may be part of a Unicode identifier as other than the first character. 53 static boolean isunicodeidentifierstartcharch This method determines if the specified character is permissible as the first character in a Unicode identifier. 54 static boolean isunicodeidentifierstartintcodepoint This method determines if the specified character Unicodecodepoint is permissible as the first character in a Unicode identifier. 55 static boolean isuppercase(char ch This method determines if the specified character is an uppercase character. 56 static boolean isuppercaseintcodepoint This method determines if the specified character Unicodecodepoint is an uppercase character. 57 static boolean isvalidcodepointintcodepoint This method determines whether the specified code point is a valid Unicode code point value in the range of 0x0000 to 0x10FFFF inclusive. 58 static boolean iswhitespacecharch This method determines if the specified character is white space according to Java. 59 static boolean iswhitespaceintcodepoint This method determines if the specified character Unicodecodepoint is white space according to Java. 60 static int offsetbycodepointschar[]a, intstart, intcount, intindex, intcodepointoffset This method returns the index within the given char subarray that is offset from the given index by codepointoffset code points 61 static int offsetbycodepointscharsequenceseq, intindex, intcodepointoffset This method returns the index within the given char sequence that is offset from the given index by codepointoffset code points.

62 static char reversebytescharch This method returns the value obtained by reversing the order of the bytes in the specified char value. 63 static char[] tocharsintcodepoint This method converts the specified character Unicodecodepoint to its UTF-16 representation stored in a char array. 64 static int tocharsintcodepoint, char[]dst, intdstindex This method converts the specified character Unicodecodepoint to its UTF-16 representation. 65 static int tocodepointcharhigh, charlow This method converts the specified surrogate pair to its supplementary code point value. 66 static char tolowercasecharch This method converts the character argument to lowercase using case mapping information from the UnicodeData file. 67 static int tolowercaseintcodepoint This method converts the character Unicodecodepoint argument to lowercase using case mapping information from the UnicodeData file. 68 String tostring This method returns a String object representing this Character's value. 69 static String tostringcharc This method returns a String object representing the specified char. 70 static char totitlecasecharch This method converts the character argument to titlecase using case mapping information from the UnicodeData file. 71 static int totitlecaseintcodepoint This method converts the character Unicodecodepoint argument to titlecase using case mapping information from the UnicodeData file. 72 static char touppercasecharch

This method converts the character argument to uppercase using case mapping information from the UnicodeData file. 73 static int touppercaseintcodepoint This method converts the character Unicodecodepoint argument to uppercase using case mapping information from the UnicodeData file. 74 static Character valueofcharc This method returns a Character instance representing the specified char value. Methods inherited This class inherits methods from the following classes: java.lang.object Processing math: 100%