Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / December 2004

Tip: Looking for answers? Try searching our database.

Convert "char" into "string" in java

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
privetv7 - 27 Dec 2004 19:27 GMT
ppl... HELP!!!!!
i don't know how to convert String into char.....

for example i can do

String input;
int number;
input = JOptionPane.showInputDialog( "Enter what ever" );
number = Integer.parseInt(input)
Peter van der Goes - 27 Dec 2004 20:19 GMT
> ppl... HELP!!!!!
> i don't know how to convert String into char.....
[quoted text clipped - 11 lines]
> Posted via http://www.codecomments.com
> ------------------------------------------------------------------------

Well, first you'll need to find a group for Java. This is the Microsoft
public group for C++ in .NET.
I'll suggest the following possibilities:

alt.comp.lang.java
comp/lang.java.programmer

are two places that should work for you.
In the meantime, you might investigate the Java Character wrapper class.

Signature

Peter [MVP Visual Developer]
Jack of all trades, master of none.

Alessandro Angeli [MVP::DigitalMedia] - 27 Dec 2004 21:27 GMT
> ppl... HELP!!!!!
> i don't know how to convert String into char.....
[quoted text clipped - 5 lines]
> input = JOptionPane.showInputDialog( "Enter what ever" );
> number = Integer.parseInt(input);

And why would you be asking a question about Java on a
Managed VisualC++ .NET group?? A question about Sun's Java,
by the way, and not even J#.

Anyway:

if(input.length() == 1) {
   char c = input.charAt(0);
} else {
   /// ERROR!
}

Signature

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.