2

I Have a file like shown below,

OrderNo   id          name        count   Format
1         AA1       sdflsdfsdfd     12      01
2         AB2       asdaewqrftr     13      02
3         AA3       aerefytrsu      12      01

I want to read this file and want to sort with orderNo. Please suggest me some way to read and sort.(in J2ME). Thanks...

selva
  • 446
  • 1
  • 7
  • 21
  • What are you trying to achieve? Do you just want to sort it in memory? Or do you want to output a sorted file? – funkybro May 20 '11 at 09:30
  • First i need to sort and store in memory, in future i will retrieve one by one – selva May 20 '11 at 11:43

1 Answers1

1
  • Create an object representing this
  • Read the file line by line ('\n' new line )
  • Sort them in memory and write them back.

Note:

  • Be careful about memory
jmj
  • 237,923
  • 42
  • 401
  • 438