Shortest self-printing java program...
Ryan Clarke
Posts: 738
Just thought this was interesting. The GNU guys have a listing of the smallest 'self-printing' java code they could find:
class _{static{new _(){{System.out.print((_+=(char)34)+_+';'+'}');}};System.exit(0);}String _="class _{static{new _(){{System.out.print((_+=(char)34)+_+';'+'}');}};System.exit(0);}String _=";}
[noparse];)[/noparse]
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
class _{static{new _(){{System.out.print((_+=(char)34)+_+';'+'}');}};System.exit(0);}String _="class _{static{new _(){{System.out.print((_+=(char)34)+_+';'+'}');}};System.exit(0);}String _=";}
[noparse];)[/noparse]
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com