List of usage examples for java.lang Character Character
@Deprecated(since = "9") public Character(char value)
From source file:Main.java
public static void main(String[] argv) { System.out.println(new Character('a').charValue()); }
From source file:Main.java
public static void main(String args[]) { Character c = new Character('c'); System.out.println(c); }
From source file:Main.java
public static void main(String[] argv) { Character character1 = new Character('a'); System.out.println(character1.toString()); }
From source file:Main.java
public static void main(String[] argv) { Character character2 = new Character('b'); System.out.println(Character.toString(character2)); }
From source file:Main.java
public static void main(String[] args) { Character c1 = new Character('a'); Character c2 = new Character('a'); String str1 = "Equal "; if (c1.equals(c2)) { System.out.println(str1); }//w w w . ja v a 2 s .c o m }
From source file:Main.java
public static void main(String[] argv) { Character character1 = new Character('a'); Character character2 = new Character('a'); System.out.println(character1.toString()); System.out.println(Character.getNumericValue(character2)); }
From source file:MainClass.java
public static void main(String[] args) { Character c1 = new Character('6'); Character c2 = new Character('7'); char c3 = c1.charValue(); char c4 = c2.charValue(); if (c3 < c4) System.out.println(c3 + " is less than " + c4); if (c1.compareTo(c2) < 0) System.out.println(c1 + " is less than " + c4); }
From source file:Main.java
public static void main(String[] args) { Character c1 = new Character('z'); Character c2 = new Character('Z'); int i1 = c1.hashCode(); int i2 = c2.hashCode(); String str1 = "Hashcode of " + c1 + " is " + i1; String str2 = "Hashcode of " + c2 + " is " + i2; System.out.println(str1);//from w w w . j a v a2 s .co m System.out.println(str2); }
From source file:Main.java
public static void main(String[] args) { Character c1 = new Character('a'); Character c2 = new Character('b'); int result = c1.compareTo(c2); String str1 = "Equal "; String str2 = "First character is numerically greater"; String str3 = "Second character is numerically greater"; if (result == 0) { System.out.println(str1); } else if (result > 0) { System.out.println(str2); } else if (result < 0) { System.out.println(str3); }/*from w w w . jav a 2 s .c o m*/ }
From source file:MainClass.java
public static void main(String[] args) { char c = '*'; Character c2 = new Character(c); System.out.println(c2.charValue()); }