Re: Why intermediate objects?



Sardaukary@xxxxxxxxx wrote:

Why does Java require you to create a StringBuffer from a string before
I can manipulate it, and then have to convert it back to a string?

It doesn't.

  String pre = "in";
  String word = "correct";
  String wholeWord = pre + word;

..Why can't this all be done transparently.

It can. It is jut not a good idea, since then the process of creating a string becomes even *less* transparent to the programmer, who is then less likely to (be able to) choose the best form for the situation.

--
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
.



Relevant Pages

  • Re: Use a Variable to set a Variable
    ... The openargs is to filter the form’s record source. ... openargs string from somewhere. ... manipulate string in Form1 to open Form2 then manipulate ... string in Form2 to Open Form3 or Report? ...
    (microsoft.public.access.modulesdaovba)
  • Re: In a macro I want to open unnamed files like *.*?
    ... Thanks - I did look it up on Google and now I understand it better. ... the point where I could manipulate all the files sequentially, ... Public Sub ProcessFile(ByVal FileName As String) ... Dim files() As String ...
    (microsoft.public.word.vba.general)
  • Re: How to parse and manipulate a binary stream
    ... character/String data doesn't give me anything meaningful - not enough ... to parse and manipulate, at any rate. ... a String representation in order to do basic String manipulations, ...
    (comp.lang.java.programmer)
  • Re: Binary File I/O
    ... > sufficiently to know if binary data sequences can be manipulated. ... > can be manipulated as Array objects (with Unicode elements? ... are a range of bitwise operators in the language to manipulate the data ... String objects can also be used in this respect Each character can ...
    (microsoft.public.scripting.jscript)
  • Re: Precision Change - Float to String
    ... > actual string object) using the ... > type float and has a value of 264588.44 then the code above results in ... there isn't a way around it as you describe using floating ... can convert to string and manipulate as you deem necessary. ...
    (comp.lang.cpp)