Char to string in java



public class ChartoString {

	public static void main(String[] args) {
		String input = "javadomain";
		char input_char = input.charAt(9);
		String chartostr = Character.toString(input_char);
		System.out.println("String input :"+input);
		System.out.println("String to char : "+input_char);
		System.out.println("char input:" +input_char);
		System.out.println("char to string :"+ chartostr);




String input :javadomain
String to char : n
char input:n
char to string :n



Thanks for reading this post…….!!!.

1,073 total views, 1 views today

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.