Online Hibernate Training just in Rs. 1000

One week online training in Hibernate ORM framework. Learn Hibernate Framework and enhance your skills. Best Online Hibernate training at 90% discount. Join Now!! Offer is valid Only for limited Period!!! Online Training Big Data and Hadoop Training Java Training  

How ro convert char into string??



Share on Google+Share on Google+

Hardik Patel
How ro convert char into string??
2 Answer(s)      6 years and 7 months ago
Posted in : Hibernate Interview Questions

Suppose i have one array like... char [] ch={'H','E','L','L','o'};

now i want to convert this arrar into string using recursive function. Then how can i do it???

View Answers

January 28, 2011 at 12:16 PM

Hi Friend,

Try this:

import java.util.*;
class ConvertCharArrayToString 
    public static void main(String[] args) 
        StringBuffer buffer=new StringBuffer();
        char [] ch={'H','E','L','L','O'};
        for(int i=0;i<ch.length;i++){
        String str=buffer.toString();


January 28, 2011 at 10:43 PM

This coding is for java...but i want this in c#

How ro convert char into string using recursive function in c#?? char [] ch={'H','E','L','L','o'};


ans = HELLO