Different ways to convert a character array to string in java and C?

,

what are the different ways to convert a character array to string in java and C?


This should help

char a[n];

// Use the constructor of string


string s(a,a+n);