hi,
the java program must read line from last to first.., it.s not in reverse order..
eg. if there are
1.first,line
2.second line
3.third line
so the output must be
3.third line
2.second line
1.first..line
i need for program for it.. can any body give idea for it..
Comments
You read the lines in the file, and you output the array from length to 0
try to use map to store the file and each access for the map is O(1) if you have n lines it will be O(N)
u can use stack concept.. start pushing each character till u get \n means new line .. so for evry line there will be sepaprate stack when u are reading .. so statrt printing from the laast stack .. means from laast line
Learn Java Programming Language Java Programming Language Java Programming Java Language