Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- /*
- * Convert char to String example. Program to convert char
- * to String.
- */
- public class CharToString {
- public static void main(String args[]){
- char ch = 'e';
- //to convert char to String use static toString method of Character class.
- String strCh = Character.toString(ch);
- System.out.println("char converted to String: " + strCh);
- }
- }

Post new comment