aspose file tools *
The moose likes Beginning Java and the fly likes StringBuffer confusion ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "StringBuffer confusion ?" Watch "StringBuffer confusion ?" New topic
Author

StringBuffer confusion ?

sharon daze
Greenhorn

Joined: Feb 08, 2009
Posts: 16
Hello all ,

how i can increase a value of StringBuffer.
For example if i have "A" inside StringBuffer element then how i can increment it to next letter.

Thanks & Regards
Sharon


http://myjvm.wordpress.com
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3284
    
  55

sharon daze wrote:how i can increase a value of StringBuffer


What do you mean by increasing the value of StringBuffer? Did you mean converting from A to B, C to D, and so on? In that case, how if you increase the 'char' value of each letter in the string.




Cheers,

Devaka.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11502
    
  16

If your stringBuffer contained "Hello. My name is Inigo Montoya.", what would you increment this to?

Further, I don't think this is a well defined problem, especially since different character sets may not have letters in the same order, or consecutive letters stored as consecutive integers. And what would you increment a 'z' to?

Can you define the problem better? Tell us exactly what you want - or if this is a homework assignment, give us the EXACT and COMPLETE text of it, and we can perhaps steer you better.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: StringBuffer confusion ?