Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Core Java - Interview Questions and Answers for 'Char to string' - 2 question(s) found - Order By Rating | ||||
| ||||
Ans. String has an argument constructor that take char array as argument and creates a string. There is no constructor available with String that takes in a character and creates a String. We can use StringBuilder which has a char argument constructor. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  character  char  char array  String  char to String  char array to String | ||||
Related Questions | ||||
Why Char array is preferred over String for storing password? | ||||
How can we convert String into Char array and vice versa ? | ||||
| ||||
Ans. We can use StringBuilder. StringBuilder accepts char as the argument for it's constructor. new StringBuilder('').toString(); | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  convert char to String  char  String | ||||
Related Questions | ||||
Why Char array is preferred over String for storing password? | ||||
What is a stream and what are the types of Streams and classes of the Streams? | ||||
What are the factors on which customers are charged for using S3 ? | ||||
What will be the output of following code ? System.out.println((int)'a'); | ||||
What will be the output of System.out.println((Integer)'a'); | ||||
What are ascii values for capital and lower case alphabets ? | ||||
Which class is used to read streams of characters from a file? | ||||
Write an SQL to find all records having all upper case alphanumeric characters in a field ? | ||||
Write an SQL to find all records having all numeric characters in a field ? | ||||
What is the character limit of url and doesn it apply to GET and POST Requests ? | ||||