• 0

[JAVA]Character to string


Question

hey,

i have two variables ch1 and ch2 which get the first letters from two strings called forname and surname, i need to merge these two characters into a string and concatenate it with another to make an email address e.g:

forname=admin;

surname=bodmin;

ch1=a;

ch2=b;

//This is the string i need to get the characters into

initials=

email=initials + "@blah.com";

any help would be great :)

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Why not simply ""+ch1+ch2+"@blah.com"?

584732443[/snapback]

didnt know i could do that, i didnt have the "" before the + ch1 + ch2; so it wouldnt work, works now :) thanks

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.