Here’s a simple program to demonstrate how to convert a Char to a String by using Character.toString() in Java.

public class ConvertCharToString{
 
	public static void main(String [] args){
 
		String website= "http://www.mkyong.com";
		System.out.println(website.charAt(11));
		String temp = Character.toString(website.charAt(11));
 
		if("m".equals(temp)){
			System.out.println("match");		
		}
	}	
}

Output

m
match
Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~