Solved

char[ ] to String conversion

Posted on 1998-11-12
2
172 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 50 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now