Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

formatting output in printstream

 
subhajit paul
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,

lets say i have a byte array declared as:



when i use


i get an output like: 2a a

can anyone suggest how to format my output as : 2a 0a

and when line 2 is changed to :


when i get an output like: 2a a?

TIA
 
Campbell Ritchie
Sheriff
Posts: 48435
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's in the Java Tutorials. Look half-way down the page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic