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

What the fuck, /prog/

Name: Anonymous 2007-09-23 10:26 ID:tKY5soH8

public static void main(String[] args)
{
    double number = (1 / 3);
    System.out.println("1 / 3 = " + number);
}


why the fuck does that output:

1 / 3 = 0.0

Process completed.


I'm confused

(it's java, btw)

Name: Anonymous 2007-09-23 11:18 ID:Heaven

I wish C and its descendants had a separate integer division operator like Pascal.

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