JS Developer :
var x = 2
x = "hello"

Java developer:
what the hell !!

  • 3
    Same goes for Python :P
  • 23
    One is a dynamic language
    Other is a strongly type language

    Whats the drama?
  • 3
    A friend of mine is a C++ programmer. He was so confused when he tried to get basic user input in Java.
  • 1
    @Noob im a java dev and c++'s streams just fuck me up big time
  • 7
  • 1
  • 1
    @RazorSh4rk yeah, well those two languages are different in so many things.
    What my friend was confused about is that theres no "native" input command but the need to import a scanner class, instantiate it, open, receive valid input and then close it.
  • 7
    @Noob it's also possible via System.console().readLine(); and because it's Java, there are also 7 other ways, out of which 5 are deprecated and 3 are considered unsafe

    C++ on the other hand has std::cin and std::getline, which both serve different purposes and are much more flexible
  • 9
    Java dev:
    Object x = new Integer(2);
    x = new String("hello");

    does it make sense?
  • 2
    Haskell: what's a "var"?
  • 1
    @hoggchan you didn't get it.

    but, Java dev:
    int x = 2;
    String y = "hello";

    that would be enough at the very most of the time.
  • 1
    @lazyDev this guy @kaqqao gets me
Add Comment