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

Pages: 1-

java is broken

Name: Anonymous 2010-09-19 19:51

So i'm messing around with the keyListener for java and here's my method:

    public void keyPressed(KeyEvent x)
    {
        System.out.println(x.getKeyChar());
        System.out.println((int)x.getKeyChar());
        System.out.println(x.getKeyCode());
        System.out.println((char)x.getKeyCode());
        keys[(int)x.getKeyChar()]=1;
    }


my output

a
97
65
A




Is java really this broken?

Name: Anonymous 2010-09-19 20:15

pussy ass bitch ass motherfucker

Name: Anonymous 2010-09-19 20:23

The shitcase gives it away and you still think Java is the one at fault. It's like I'm reading /prog/.

Name: Anonymous 2010-09-19 20:24

Java is broken, but not for this reason. The fact that you're incapable of reading documentation isn't a problem with the language you're using.

Name: Anonymous 2010-09-19 22:14

>>4
Hm, is there a reference /anus/ thread enumerating all of Java's shortcomings? I'd love to give a good (re-)read.

Name: Anonymous 2010-09-19 23:19

Something i hate about java? The ternary operator... Why the fuck would they make it only be allowed if you were returning a value to a variable. Why couldn't they of made it so you can use it for shot if+else statements with no return.

Name: Anonymous 2010-09-20 0:00

>>6
It's a reasonable choice to make. Ternary is usually only cleaner when doing assignment anyway. See also:

( foo() && bar() || baz() );

Name: Anonymous 2010-09-20 1:40

>>1
Seems alright to me.

Name: Anonymous 2010-09-20 11:29

There's nothing wrong with this and I don't even use Java. What's your problem with it?

Name: Anonymous 2010-09-20 11:57

>>1
That exactly how it should work.
keyChar != keyCode.

Name: Anonymous 2011-02-03 3:53


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