This week's book giveaway is in the Functional programming forum.
We're giving away four copies of Functional Design and Architecture and have Alexander Granin on-line!
See this thread for details.
Win a copy of Functional Design and Architecture this week in the Functional programming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Vector and StringBuffer

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added 6 vectors to a stringbuffer in a function, which returns the stringbuffer.

In the called method, i need to get the vectors back from the stringbuffer. How do i get the vectors from the stringbuffer?
 
author and cow tipper
Posts: 5001
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's a function?

Could you give us a snippet of code to show us what you're trying to do?

Have you put a bunch of StringBuffer instances into a Vector, or are you putting Vectors into a StringBuffer?

Maybe we can help you out if we can see a quick code snippet?

-Cameron McKenzie
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess that you really mean "method" when you say "function".

A StringBuffer is an object that is used to efficiently create strings. It is not a general purpose container class in which you can store objects such as Vectors, so that you can later retrieve them. There is no straightforward way to add a Vector to a StringBuffer or retrieving Vectors (or any other kind of objects) from a StringBuffer. Show us your code, that will make it more clear what you mean exactly and what you're trying to accomplish.
[ February 15, 2008: Message edited by: Jesper Young ]
 
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic