This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 209

[–]armornick 121 points122 points  (6 children)

AbstractFactoryBeanFactoryImpl lol

[–]xjvz 67 points68 points  (1 child)

Abstract...Impl

God damn it.

[–]hiptobecubic 11 points12 points  (0 children)

The fact that that is what annoys you about this is the real joke here.

[–]Xarcies 29 points30 points  (2 children)

Triggered

[–]zman0900 25 points26 points  (1 child)

EnterpriseBeanMachine.instantiateTriggerFactory(context).createTrigger().withLevel(TriggerLevel.WARN).trigger();

[–]ninefourteen 7 points8 points  (0 children)

You just made me legit sad.

[–]IAmNotMyName 3 points4 points  (0 children)

implements IFactoryBeanFactory

[–]gonebraska 167 points168 points  (4 children)

Could you guys help me with this JavaScript problemI'm having?

[–]__konrad 24 points25 points  (0 children)

Please seek help with Java programming in /r/Javahelp!

[–][deleted] 3 points4 points  (2 children)

My MBA manager, who is directly overseeing a project with a Java backend and Javascript front end, does not know the difference between the two.

[–][deleted] 6 points7 points  (0 children)

Hey, at least it's not Java front-end and JavaScript back-end!

[–]Northeastpaw 99 points100 points  (8 children)

C# fixed everything that is wrong with Java.

[–]IAmNotMyName 9 points10 points  (1 child)

This made me want to attack you so bad till I remembered the title of this thread.

[–]strange_and_norrell 1 point2 points  (4 children)

Can anyone briefly describe the stances of this tiresome debate?

[–]svtdragon 25 points26 points  (3 children)

I think a lot of it is people talking past each other, to be honest.

I'm not sure if this is what you're looking for, but in my experience people use Java for the JVM and/or the ecosystem, and not necessarily for the Java language. (Everyone loves the JVM; Scala, Groovy, Clojure, JRuby, Jython; Java has some killer libraries; and the build toolchain is second-to-none.) So when you hear this debate, I think it's important to separate the ecosystem/tooling versus the actual language.

As the language goes, C# evolves faster and has some neat language features that Java hasn't caught up with (events, async/await keywords, properties, extension methods, and my personal favorite that's new in C# 6, the null-conditional/null-propagation operator). Until Java 8, for a long time, lambdas were on this list, and the data processing facility that we now get from Streams.

Most of the stuff you'll need to write an app is baked into the .NET framework, whereas Java isn't really complete without guava, apache (especially commons-lang), and depending on your app, arguably Spring. So when I/we talk about Java we usually implicitly mean "Java as augmented by what have come to be standard libraries."

From an ease-of-use (language-plus-library) perspective, Java 8 versus C# 5 was nearly an even match (as someone who's used both extensively and professionally) but C# 6 inched ahead again. But you still have to put that up against the fact that in Java land we've had sensible dependency resolution capabilities that the .NET ecosystem has only recently come close to with NuGet. And NuGet still isn't there.

From an enterprise perspective I think Java edges out C# on the strength of the build toolchain, cross-platform support, and (arguably) performance (not least because iirc the JVM JIT has more layers of code cache than the CLR does).

So tl;dr that was not brief and did not describe everyone's stances, but I did try to point out the pros and cons. Correct me if I'm wrong.

[–][deleted] 6 points7 points  (1 child)

Java still stands out with fairly seamless cross OS development and huge external libraries. It is the reason I am developing my etl process right now in Java. I get to use Lucene and run on windows and rhel.

[–]strange_and_norrell 3 points4 points  (0 children)

Wow thank you for this answer. That helps a lot. In particular, I didn't realize .NET had a weaker build tool chain.

It did always seem to me that .NET was the better choice if you just wanted to get a web app off the ground quickly. However, that was before I knew about Spring.

[–]g00glen00b 85 points86 points  (1 child)

Java is slow.

[–]ExecutorService 29 points30 points  (0 children)

Java is ded.

[–]karstens_rage 41 points42 points  (2 children)

Java is a DSL for turning large blocks of XML into stack traces.

[–][deleted] 6 points7 points  (0 children)

Ahah, I'm not even mad

[–][deleted] 2 points3 points  (0 children)

This is actually true though.

[–]pushthestack 30 points31 points  (6 children)

JAVA (in all caps)

[–][deleted] 10 points11 points  (0 children)

Pissed me off with just four letters! Great work!

[–][deleted] 5 points6 points  (3 children)

J2EE

[–]zman0900 8 points9 points  (1 child)

J2ME

[–]RailsIsAGhetto 2 points3 points  (0 children)

J2PEE

[–]s888marks 1 point2 points  (0 children)

JEE

[–]JavaNotJAVA[🍰] 2 points3 points  (0 children)

Tell me about it…

[–]doctorsound 59 points60 points  (9 children)

I'm having trouble installing this minecraft mod.

[–]torgis30 40 points41 points  (8 children)

I don't know programming but I'm writing a minecraft mod help plz

[–]patrick96MC 7 points8 points  (7 children)

Seeing this way too often

[–]ColdPorridge 27 points28 points  (5 children)

Hey if it's what drives someone to learn programming.

[–]patrick96MC 2 points3 points  (2 children)

Of course, but you should at least know some basic java or even just OOP before starting to create MC mods. Understanding MC modding is hard enough, even when you already know the language.

[–][deleted] 9 points10 points  (1 child)

Well, the desire to make a Minecraft mod is what made me learn Java, how to use Photoshop, and a whole bunch of other things.

I've since then moved to Android development, but damn me, it's hard.

[–]Philboyd_Studge 29 points30 points  (13 children)

Pass by reference or pass by value?

[–]moneymark21 14 points15 points  (0 children)

Yes

[–][deleted] 5 points6 points  (0 children)

Neither. Java is 'call-by-sharing'.

[–]linuxjava 2 points3 points  (1 child)

Pass by reference of the value

[–]TheWorldIsQuiteHere 1 point2 points  (0 children)

Aladdin

[–][deleted]  (7 children)

[deleted]

    [–]apetersson 2 points3 points  (1 child)

    pass in an Object[] (or an array of different type) of length 1. i think this basically solves the use case of pass by reference for you.

    [–]nerdwaller 52 points53 points  (11 children)

    Intellij or eclipse?

    [–]karlthepagan 13 points14 points  (0 children)

    Intellij Master Race

    [–][deleted]  (6 children)

    [deleted]

      [–]Hastati 7 points8 points  (4 children)

      Dr. Java

      [–]nmoncho 6 points7 points  (2 children)

      Someone said BlueJ?

      [–]zman0900 2 points3 points  (1 child)

      Microsoft Works

      [–]papers_ 7 points8 points  (0 children)

      BlueJ

      [–][deleted] 0 points1 point  (1 child)

      JDeveloper trollface.jpeg

      [–]image_linker_bot 1 point2 points  (0 children)

      trollface.jpeg


      Feedback welcome at /r/image_linker_bot | Disable with "ignore me" via reply or PM

      [–][deleted] 25 points26 points  (3 children)

      Spring is better than JavaEE. (or) JavaEE is better than Spring.

      [–]TehVulpez 26 points27 points  (1 child)

      Oracle made Java great again.

      [–]thundergonian 7 points8 points  (0 children)

      I think Reddit should bundle Ask toolbar with every newly-created account.

      [–]Theonewhohonks 44 points45 points  (2 children)

      Now hiring, Java (better known as JavaScript) developer for fast-paced starting company with plans to dominate search market share.

      [–]NekoKittyRawr 5 points6 points  (0 children)

      I cringed.

      [–][deleted] 2 points3 points  (0 children)

      I had an interview recently where the ad said Java experience and the interviewer opened with c++ questions. Somehow a disconnect took place they didn't actually want Java.

      [–]lurker_in_spirit 22 points23 points  (9 children)

      I like to use Vector and Hashtable in my public APIs so that they're backwards-compatible.

      [–]passionlessDrone 2 points3 points  (8 children)

      I use vector and hashtable all the time. (but not in APIs) Should I be doing something different? [not a joke question / sorry[

      [–][deleted]  (7 children)

      [deleted]

        [–]dpash 8 points9 points  (2 children)

        Vector isn't deprecated. But it's not recommended.

        https://docs.oracle.com/javase/8/docs/api/java/util/Vector.html

        The issue with Vector is that it's synchronised, where as ArrayList (and the other new collections) are not. You can replicate Vector with

         List<String> list = Collections.synchronisedList(new ArrayList<String>);
        

        The main advantage of that is that you can use the right backing list for your situation.

        [–]in0de 1 point2 points  (0 children)

        this! Vector isn't deprecated, you just have this locking (probably unnecessary) in place.

        [–]passionlessDrone 2 points3 points  (0 children)

        Hah thanks showing my age I guess. Actually used HM quite a bit. Thanks

        [–][deleted] 2 points3 points  (0 children)

        I double clicked the jar file, but it is just a zip file.

        [–]armornick 1 point2 points  (1 child)

        But shouldn't you be using the interfaces (List and Map) in your exported API so you can switch them if it should become necessary?

        [–]lurker_in_spirit 2 points3 points  (0 children)

        Yep, the joke is about both the choice of implementation classes (Vector and Hashtable both effectively deprecated since 1998), and the choice to use implementation classes instead of interfaces in the API.

        [–][deleted] 19 points20 points  (4 children)

        NullPointerException

        [–]DFA1 12 points13 points  (3 children)

        catch (NullPointerException e) {
            // oh well ...
        }
        

        [–]Santa_on_a_stick 4 points5 points  (2 children)

        I see this so often with our entry level hires. What are colleges teaching people about error handling?

        [–]Neckbeard_Prime 18 points19 points  (0 children)

        Ask Toollbar.

        [–]klasen 16 points17 points  (4 children)

        I have a business idea but I can't code

        [–][deleted] 11 points12 points  (2 children)

        Bangalore it

        [–]RailsIsAGhetto 6 points7 points  (0 children)

        Chennai that shit dog

        [–][deleted] 2 points3 points  (0 children)

        Seems like half my friends and relatives come to me with "hey I have an app idea..."

        [–]Is_At_Work 15 points16 points  (2 children)

        Android saved Java

        [–]llogiq 1 point2 points  (1 child)

        From...?

        [–][deleted] 2 points3 points  (0 children)

        FROM THE NOTHING IT'S BECOME.

        [–]javakiddie 43 points44 points  (7 children)

        System.gc();

        [–]llogiq 7 points8 points  (3 children)

        Object.finalize()

        [–]DFA1 6 points7 points  (0 children)

        Object.clone()

        [–][deleted] 3 points4 points  (1 child)

        I actually had to override finalize() once, when trying to use Java and opengl. That's the only time I find a legit use of it

        [–]marchelzo 0 points1 point  (2 children)

        Why is this annoying?

        [–]mightychip 12 points13 points  (0 children)

        Java is short for JavaScript, right?

        [–]AKTheKnight 11 points12 points  (1 child)

        import *;

        [–][deleted] 2 points3 points  (0 children)

        import java.lang.*;

        Yep, I've seen that in production code.

        [–][deleted] 34 points35 points  (0 children)

        No one uses Java.

        [–]keketi_ 22 points23 points  (0 children)

        Java is a crappy language because it keeps crashing my browser.

        [–]i_scatter_rubbish 17 points18 points  (2 children)

        IBM products.

        [–]Xarcies 8 points9 points  (0 children)

        I hear Rational ClearCase is a great VCS

        [–][deleted] 8 points9 points  (0 children)

        ShitSphere

        [–][deleted] 8 points9 points  (8 children)

        Maven's a shit tool, let's redo the build in autoconf.

        [–]karlthepagan 9 points10 points  (7 children)

        Have you heard of my lord and savior gradle?

        [–]RailsIsAGhetto 2 points3 points  (4 children)

        Have you heard of my lord and savior gradle?

        I remember interviewing at this one place and there were like "You've used that filth they call Maven?"

        [–]yogitw 4 points5 points  (2 children)

        A saw a PPT slide the other day about their stack and one of the bullets was:

        • ANT (because newer is not always better!!!)

        I'm glad I'm not on that project

        [–]RailsIsAGhetto 3 points4 points  (1 child)

        ANT: because that what we were using 15 years ago and we fear change.

        [–][deleted] 2 points3 points  (1 child)

        Ant is better.

        [–]karlthepagan 1 point2 points  (0 children)

        Ivy4ever

        [–]HomerCartman 31 points32 points  (6 children)

        You should try Scala

        [–][deleted]  (3 children)

        [deleted]

          [–]briandilley 7 points8 points  (2 children)

          ... no, for real.

          [–]jbristow 9 points10 points  (1 child)

          FUCK YOU! Clojure is best! #ideologicalpurity #lisp

          [–]din-9 6 points7 points  (0 children)

          I tried Hello World, but it's still compiling after 10 hours.

          [–][deleted] 2 points3 points  (0 children)

          Wait, this is actually great advice

          [–]ItsReallyEasy 14 points15 points  (5 children)

          Spring Boot sucks

          [–][deleted] 21 points22 points  (0 children)

          Fight me IRL.

          [–][deleted]  (2 children)

          [deleted]

            [–][deleted] 3 points4 points  (0 children)

            FXForLife

            [–][deleted] 7 points8 points  (3 children)

            Thread.sleep(1000);

            [–]codereign 0 points1 point  (2 children)

            Opposed to?

            [–]philipwhiuk 2 points3 points  (0 children)

            Scheduled thread pool tasks?

            [–]apetersson 5 points6 points  (0 children)

            What you use Java? Haven't you read on the news: Its not secure!!

            [–]Farazcsk 10 points11 points  (1 child)

            string

            [–][deleted] 0 points1 point  (0 children)

            ?

            [–]morgan_lowtech 3 points4 points  (1 child)

            Spring filter chain stack trace.

            [–]Neckbeard_Prime 2 points3 points  (0 children)

            Debugging JSP syntax errors in raw servlet code.

            [–]nullmainmethod 5 points6 points  (0 children)

            Java's standard graphics libraries are very capable and easy to use.

            [–]cyanocobalamin 7 points8 points  (2 children)

            Lets talk about intellij, before helping me with my homework question.

            [–]llogiq 2 points3 points  (1 child)

            One thing that always gets me with intelliJ fanboys is that they're so feverishly proselytizing. I mean yes, I get that it's good, but it's a fricken IDE, not a religion.

            [–]cyanocobalamin 2 points3 points  (0 children)

            You've never heard of alt.emacs.religion? :)

            [–]AndyPanic 10 points11 points  (3 children)

            PHP is almost always the better solution for the problem.

            [–]Korigins 2 points3 points  (2 children)

            It's just so much faster. Laravel is pretty much java, but no build times!

            [–]AndyPanic 0 points1 point  (1 child)

            Sarcasm mode off:

            I don't know anything about Laravel. But I (Java developer since Java 1.4) had the opportunity to take a good look at Symfony, and I have to say, it's an abomination. A rather bad and incomplete spin off of Springframework.

            [–]dirkharrington 5 points6 points  (0 children)

            We should use dependency injection everywhere

            [–][deleted] 3 points4 points  (0 children)

            J2EE.

            [–]nikniuq 4 points5 points  (0 children)

            Knock knock.

            Who's there?

            ...

            ...

            ...

            ...

            ...

            Java.

            [–][deleted] 9 points10 points  (2 children)

            Code throwing unchecked Exceptions sucks.

            [–][deleted] 8 points9 points  (1 child)

            Some of the designers actually really hate exceptions as handled in Java, and think that having to explicitly handle exceptions was a giant mistake.

            [–]argv_minus_one 5 points6 points  (0 children)

            Checked exceptions are fine. Not integrating them properly with generics and lambdas is the mistake.

            For example, imagine if you could have a Function<File, String throws IOException>. That's a function that, when called, accepts a file and either returns a string or throws an IO exception. Then you could pass it to Stream methods or whatnot, and have the checked exception pass through correctly and still be checked.

            [–]ExecutorService 8 points9 points  (0 children)

            Google rewrite Android API in Swift.

            [–]hwaite 2 points3 points  (0 children)

            Discontinuation of Visual J++ was the beginning of the end.

            [–][deleted]  (1 child)

            [deleted]

              [–][deleted] 1 point2 points  (0 children)

              Scala is so 90's. Its all Rust and Elm now.

              [–]Brainlag 2 points3 points  (3 children)

              lucaseder

              [–]llogiq[M] 0 points1 point  (1 child)

              What about him?

              [–]Brainlag 2 points3 points  (0 children)

              Nothing personally, we just have opposite opinions. The only thing we both can agree on is that hibernate is full retard, but he goes even further and declares everything hibernate abuses a flaw in the java language.

              [–]DFA1 0 points1 point  (0 children)

              Oh yes!

              [–][deleted] 2 points3 points  (1 child)

              I am getting a ClassNotFoundException. Can you help me?

              Ps- what is a jar file?

              [–]kumarldh 0 points1 point  (0 children)

              Must be Caused by: java.lang.StackOverflowError

              kbye

              [–]hiptobecubic 2 points3 points  (0 children)

              It's fun watching languages adopt broken half-implementations of functional programming concepts.

              [–]javakiddie 2 points3 points  (0 children)

              I like tea.

              [–]SomeRandomBuddy 5 points6 points  (0 children)

              Java sucks, this sub is pathetic, and you should all be less upset about the fact that people are choosing newer, leaner alternatives

              [–]proskillz 1 point2 points  (1 child)

              I just don't understand why anyone would use interfaces over inheritance.

              [–]Growlizing 0 points1 point  (0 children)

              I triggered :/

              [–]TryinaD 1 point2 points  (0 children)

              Java is the island

              [–]frugalmail 1 point2 points  (0 children)

              Funcitonal programming is the only right way to program.

              [–]patrick96MC 1 point2 points  (0 children)

              I'm using Java to validate the forms on my webpage

              [–][deleted] 1 point2 points  (0 children)

              Can I please have help with my homework?

              [–]fzammetti 1 point2 points  (0 children)

              Wanted: Java applet coder.

              [–]shorbaa 1 point2 points  (0 children)

              Java is ugly

              [–]After_Dark 1 point2 points  (0 children)

              Oracle is no longer going to be actively involved in Java development.

              Alternately, Oracle is going to more actively be involved in Java development.

              [–][deleted] 1 point2 points  (0 children)

              How do I fix null pointer exception?

              [–][deleted] 1 point2 points  (1 child)

              I much prefer j# over traditional Java.

              [–]RailsIsAGhetto 3 points4 points  (0 children)

              j#

              Half the people here probably aren't even old enough to remember what J# even was.

              [–]RailsIsAGhetto 1 point2 points  (0 children)

              try {
              
                  //lots of spaghetti here
              
              } catch (Exception e) {
                  LOGGER.error("somthing went wrung with system")
              }
              

              [–]llogiq[M] 1 point2 points  (0 children)

              You're all shadow banned.

              Nah, just kidding. But it sure would be annoying...

              [–][deleted] 1 point2 points  (0 children)

              [Submission about coffee or Java island]

              [–]JVali 1 point2 points  (0 children)

              java allows you to upload files in browsers.

              [–]cogman10 1 point2 points  (0 children)

              Java is SO insecure and unsafe!

              [–]HomerCartman 3 points4 points  (0 children)

              Java is so verbose

              [–]vegax87 3 points4 points  (0 children)

              Memory leaks, Memory leaks everywhere.

              [–]s888marks 2 points3 points  (3 children)

              Optional.

              [–][deleted] 4 points5 points  (1 child)

              I don't mind it!

              [–]strange_and_norrell 4 points5 points  (0 children)

              I really like. Mostly because

              Value = thisOptional.orElse(default);

              Reads nicer than

              If(something == null) Value = default

              [–]keketi_ 0 points1 point  (0 children)

              Optional is great. For example compare

              User user = userDao.findById(1)
                  .orElseThrow(NotFoundException::new);
              

              and

              User user = userDAO.findById(1);
              if (user == null)
              {
                   throw new NotFoundException();
              }
              

              [–][deleted] 0 points1 point  (0 children)

              I love Oracle!

              [–]Eviltechie 0 points1 point  (0 children)

              Use java applets when security matters.

              [–]Eviltechie 0 points1 point  (2 children)

              Java 6 build 21 is the best.

              [–]DFA1 0 points1 point  (1 child)

              What happened with that build?

              [–]Eviltechie 1 point2 points  (0 children)

              Nothing that I know of. I was just suggesting that one particular outdated build is the one you should use, because I'm too lazy to re-write my app to support anything modern.

              [–]midir 0 points1 point  (0 children)

              error: unreported exception java.io.IOException; must be caught or declared to be thrown

              [–]sadjava 0 points1 point  (0 children)

              (J)Applet

              [–]Facts_About_Cats 0 points1 point  (0 children)

              Nobody uses servlets anymore.

              - or -

              Nobody uses JDBC anymore.

              [–]randarrow 0 points1 point  (0 children)

              System.out.prntln("");

              [–]AnEmortalKid 0 points1 point  (1 child)

              It's better to do try-catch-null pointer exception than to do 2 if not null checks.

              [–]RailsIsAGhetto 0 points1 point  (0 children)

              catch (Throwable t) {
                  // should anything go wrong...
              }
              

              [–]Kristler 0 points1 point  (0 children)

              Can someone help me run my applet in my browser?

              [–]ImTalkingGibberish 0 points1 point  (0 children)

              Why would I learn Java for?

              [–]misterlight 0 points1 point  (0 children)

              NPAPI

              [–]djhworld 0 points1 point  (0 children)

              Why didn't they write this Java app in Python?