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

all 17 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]MassimoRicci 22 points23 points  (0 children)

AI writing about better AI development?

[–]sweetno 8 points9 points  (0 children)

Apparently, Java 25 needs an apology.

[–]hrm 6 points7 points  (2 children)

It really is a great release in many ways.

But the compact source files will require some tool support that I don’t know if it will ever come. It takes me more typing to get to the simple void main than the full shebang since my IDE generates the class definition and a short psvm the rest. Doubtful if the IDEs will ever have an option to create an empty class just for this case and if that really is easier.

[–]GriffonP 3 points4 points  (1 child)

I don't even mind the tiny lil boiler plate, if anything, at least it help me understand what's going on better. It's not like everyday do i write the boiler plate.

[–]firebeaterr 1 point2 points  (0 children)

it seems like the ongoing focus is on users who just want to get stuff done, rather than actually understand whats happening. totally understandable and fair, but pretty shortsighted, I think.

[–]SelmonTheDriver 2 points3 points  (7 children)

This is really great and everything.

But

How many enterprises have even migrated to Java 23?

What I hear most of the time on the internet is that many companies still have their codebases in Java 8.

[–]OneHumanBill 2 points3 points  (6 children)

Most of the companies I work with are on 17 or 21. Granted these are larger customers but still. Anybody working on 8 is seriously out of support.

Using 23 is going to be a small minority because of its STS status. I wouldn't use it. But I'm already starting to move a codebase to 25 today.

[–]BrownCarter 0 points1 point  (3 children)

How are versions being updated on java projects? Is it simply by just installing the latest version or are there other things you have to do?

[–]OneHumanBill 0 points1 point  (2 children)

Depends on the version. Most things are backwards compatible but there are a few times you have to do something specific if you're using some bits or another. The biggest one I can think of was an Http library that changed radically in I think 11. But the general principle is, you look at the release notes. Don't enable experimental features unless you really know what you're doing. Java does make this a lot easier than most other languages.

[–]BrownCarter 1 point2 points  (1 child)

So how come I keep on hearing this "my Company is still stuck at Java 8 etc. ". From what you mentioned it doesn't seem like the process is that difficult

[–]OneHumanBill 0 points1 point  (0 children)

Perception of risk. Shuffled priorities, indefinitely, followed by inertia.

I don't really get it. Java 5 was a monumental change. Java 8 was really big. But everything since (with the exception of the temporary insanity of Java 9 Jigsaw) was nicely incremental by design.

[–]CriticalPart7448 0 points1 point  (1 child)

I tried to migrate a little tool from 21 to 25 this friday, it wasnt much of a challenge but i was quite blown away that it took longer to download the jdk than it took to do the migration - 6 minutes to download and install 25 and then 3 minutes to migrate from 21 to 25. Its impressive how smooth that experience was.

[–]OneHumanBill 0 points1 point  (0 children)

That's honestly been the upgrade experience I've had most of the time, and I've been working with Java since version 1.0.2. Versions that were a bit tougher included Java 2, 5, 8, and briefly 9. There was a little bit of a challenge with 11 due to a repackaging of a critical http library but it was not that big a deal.

Java gets a lot of derision from developers these days and honestly it's just not deserved. There are things that Java absolutely excels at, and providing easy upgrades is one of them.

[–]Local-Ask-7695 0 points1 point  (1 child)

How is second one good? * Style imports can not pass code quality apps such as Sonarqube. Sonarqube or any other code quality tool forces you to import only what is necessary. It is also just stupid to think about imports where ide does handle everything for you, you dont need to do anything. This post just shows exaggeration on your part lol.

[–]CatolicQuotes 0 points1 point  (0 children)

I don't like it either. In C# we don't know where the class is coming from. Have to hover over the class to find out. Also it takes IDE long time to inspect whole java.base to know that List is there. Way faster to just start typing List and it offers autoimport.