English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

write empty spaces between fields of data, given that the length of those empty spaces would be say, (40 - length of field in data).
In VB it would have been like: Space(40 - field.length). What is the Space() counterpart in Java. Thanks

2007-04-26 21:03:02 · 1 answers · asked by kenshin 3 in Computers & Internet Programming & Design

testing123

2007-04-26 22:11:51 · update #1

Thanks for the answer(s).
I did this:
String spaces = " ";
spaces.substring(0,40-str.length));
//Assuming length of (40-str.length) wont exceed length of string spaces

2007-04-26 22:18:58 · update #2

1 answers

That will be a method that you write to extend a string by n spaces, probably using a stringBuffer that will return a string.

2007-04-26 21:25:04 · answer #1 · answered by AnalProgrammer 7 · 0 0

fedest.com, questions and answers