hi Michael and Jim oo... I regret that I can not see the elegant coding result. JAD refuses to work with .class files whose version number exceeds 46 (meaning, no JDK 1.3 or 1.4). The compiler give me following error message java.lang.UnsupportedClassVersionError: HeresYourLoop ( Unsupported major.minor version 48.0 ) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.lang.ClassLoader.defineClass(ClassLoader.java:426) at test2.FoundTheLoopHelloWorld100.<init>(FoundTheLoopHelloWorld100.java:9) at test2.FoundTheLoopHelloWorld100.main(FoundTheLoopHelloWorld100.java:9) Exception in thread "main" I really want to see the result How can I do?
Joined: Jan 30, 2000
In Michael's code, the 8th number (index 7) in the array "bytes" is 48. Change it to 46 (using a text editor). Write these bytes to a file and decompile. The same technique will probably work in my code. [ May 13, 2003: Message edited by: Jim Yingst ]
Joined: Jan 04, 2003
thanks Jim I see the elegant hided coding
Does the CIA use the same technique to decrypt the encrypted message from Russia?
i have some idea for this if you want to print "hello world" 100 times without using the loop,recursion and any control structure see this solution
static int i=0;
int a=new int;
class b extends a
public static void main(String ff)
Well, it is. Unfortunately, the original assignment text is no longer available, but from the discussion I've understood that neither loops, nor stuffing the "hello world" 100 times into the program are allowed. So the only thing that is left is some sort of a self-modifying assembly code, since I'm pretty sure that you cannot even print in Java without invoking some loops buried deep in the IO system
Joined: Mar 05, 2008
Yeah, all the "solutions" thus far have been exercises in how to hide a loop somewhere. Or how to hide recursion somewhere. I don't think there is any truly satisfactory solution, but it's interesting to see what tricks people came up with.
subject: 100 times "hello world" without loop or recursive