r/ProgrammerAnimemes • • Mar 21 '20

Za Warudo

Post image
1.2k Upvotes

14 comments sorted by

View all comments

-2

u/espriminati Mar 21 '20
int main(string[] args) {
    printf("ハローワールド!")
    return 1;
}

31

u/nwL_ Mar 21 '20

> putting string in the global namespace

> returning 1 from a program executing correctly

> using a string array (isn’t it char*[] or something?)

> forgetting a semicolon

> aren’t kanas rather wchars?

15

u/hewwocraziness Mar 21 '20

Yup, this is Reddit alright.

0

u/[deleted] Mar 21 '20

[deleted] — view deleted comment

8

u/[deleted] Mar 21 '20

Since that was a weird amalgamation of Java and C++, here’s the Java as well:

public static void main(String[] args) {
    System.out.println(“ハローワールド!”);
}

No need to use or return an int. And “Hello World!” functions are generally in the main method.