<!-- jbb_cong_country = "EG"; -->
Self-writing program
Folks,\\There is an interesting programming problem that was one of the coolest puzzles I took in CS courses. It is about whether you can write a program that writes itself upon execution!\\That is, if the source code is something like that (pseudo-code)
{{{
Begin
Print(“Something ……”)
End
}}}
The output after execution should be exactly that same!
{{{
Begin
Print(“Something ……”)
End
}}}
Now, java gurus! who’s gonna provide us with a java program that writes itself? :) \\
Note that the program should not accept any inputs (reading some file or accepting user inputs)





Here it is
the code provided seems to
Anthor Version
I got your point now.
May be...
replacing StringBuffer a
Smaller Version
Perfect! The file is even