public class Demo
{
public static void main(String args[])
{
char[] a = {'a','b','c','d','e'};
System.out.println(convert(a));
}
static String convert(char []ch)
{
StringBuffer sb = new StringBuffer("");
for(char aa:ch )
sb.append(aa);
String ss = new String(sb);
return ss;
}
} |