Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Java Challenge

Name: Anonymous 2010-06-19 15:26

Count to 10 in the most obfuscated way possible using a maximum of 10 lines of code(not counting class and main declarations).

Lines of code should be counted as if you were coding in a normal properly formatted style.

Name: Anonymous 2010-06-19 15:34

public class JavaChallenge {
    //Thanks Jerry!
    public static void main(String[] args)
    {
        System.out.println("1/n2/n3/n4/n5/n6/n7/n8/n9/n10/n");
    }

}

Name: Anonymous 2010-06-19 15:47

>>2
A real Java user wouldn't use K&R indentation.

Name: Anonymous 2010-06-19 16:11

i;main(){i=strlen("HAX MY ANUS");while(i--)printf("%d\n",10-i);}

Name: Anonymous 2010-06-20 20:33

OP here, lack of responses to this post leads me to believe:

a) /prog/ doesn't know shit about java

or

b) java can't be obfuscated very well(when there is a code size limit)

Name: Anonymous 2010-06-20 20:53

>>5
c) nobody on here gives a shit about this thread or has time to complete your silly challenge

Name: Anonymous 2010-06-20 20:57

>>5
d) all of the below

Name: Anonymous 2010-06-20 21:09

>>5
I'll admit I tried, but I couldn't obfuscate the counting very well.  I did manage to create a program that can try but only has a small chance of ever counting to 10 eventually; but, that's not what was asked.

Name: Anonymous 2010-06-20 21:24


public class ProgChallenge {
    public static void main(String[] args) {
    for (int i=11; i < 21; i++) {
        System.out.println(i % 10);
    }
    }
}

Name: Anonymous 2010-06-20 21:38

>>5
I know Java better than I care to admit, and that's exactly why I never want to write any ever again.

Name: meh 2010-06-20 21:46


public class sdfsdsdf
{
    public Integer egypt(){ return new Integer(1); }  
    public int allllYourBase(){return 0;}
    public int allllYourBase(int s){return 9+s;}
 
    public static void main(String[] args)
    {
        Integer five;
        for(five = Integer.valueOf(new sdfsdsdf().allllYourBase());
            five.value() < Integer.valueOf(new sdfsdsdf().allllYourBase(1)).value();
            five = Integer.valueOf(five + new sdfsdsdf().egypt()))
        {
            System.out.println(five);           
        }
    }
}

Name: Anonymous 2010-06-20 21:47

Oh, I probably meant intValue rather than value(). Now I happily don't remember that well.

Name: Anonymous 2010-06-20 22:31

>>11
Even with that correction - value() to intValue() - it still only counts up to 9.  Tough break.

Name: Anonymous 2010-06-21 0:49

Actually, Java is the most easily obfuscate-able language due in large part to the excellent reflection support. The fact that nobody has entered this challenge is evidence only of the fact that it is neither fun nor challenging.

Name: Anonymous 2010-06-21 8:08


for(int i = 1; i != 11; i++)
{
  System.out.println(i);
}


Most JavaTM programmers would not understand this, so I guess it counts as obfuscation.

There is no more spoilered text.

Name: Anonymous 2010-06-21 23:02

>>14
5 people have entered 5 people have failed horribly.

Name: Anonymous 2011-02-04 13:01


Don't change these.
Name: Email:
Entire Thread Thread List