A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Meteor in Action
this week in the
Java in General
can we have parametrized String in java ?
Joined: Jul 14, 2005
Sep 28, 2006 04:04:00
thank you for reading my post
i want to know can we have parametrize
for example i need a template string like :
"you have contact us from email address [param] and here is your detialed answer"+
"your transfered amount is "+ [param]
"your purchased service is "+[param]
Joined: Apr 14, 2004
Sep 28, 2006 04:10:00
Yes. Have a look at the
Jesper de Jong
Joined: Aug 16, 2005
Sep 28, 2006 05:10:00
Or, if you are using Java 5 or newer, the method String.format().
String s = "you have contact us from email address %s and here..."; String result = String.format(s, "firstname.lastname@example.org");
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 8 API documentation
I agree. Here's the link:
subject: can we have parametrized String in java ?
Context param values from web.xml
session cookie problem when UAT and production runs at same time by a user.
Managed beans aren't constructed running on JBoss 5.1.0 (works fine with Tomcat 6)
Converting String to an array.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015