• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not giving the desired output  RSS feed

 
Alen Grace
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
my program is woring now, but the output is surrounded by [ ],and when I look at my program, I did not see that the string will be surrounded by [].
I used bufferedreader inputstreamreader, in order for the user to input the data.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're going to have to provide a lot more detail.
Without seeing your code nobody can say for certain what the problem is, so why don't you post your code (UseCodeTags) with an example of the output you are getting and the output you were expecting.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
+1 on showing the code. I suspect that you're using the toString() method, possibly without realizing that you're doing so. That method surrounds elements of a collection -if that is what you're printing, you haven't said- with square brackets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!