Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

char[ ] to String conversion

Posted on 1998-11-12
2
Medium Priority
?
221 Views
Last Modified: 2012-05-04
What is the best way for me to convert a character array to a String???  A quick answer would sure be appreciated.
0
Comment
Question by:2djohn
2 Comments
 
LVL 6

Accepted Solution

by:
gadio earned 150 total points
ID: 1227276
try this:

char a[] = new char[10];



String str = new String(a);
0
 

Author Comment

by:2djohn
ID: 1227277
Great- I figured it would be something simple... I hate string manipulation in any language.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Suggested Courses

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question