/jpg/ Java Programming General

A general for the best, and most popular programming language in history.

Anyone excited about Java 11?
openjdk.java.net/projects/jdk/11/

Most ambitious new developments (AOT compiler, new GC) are only targeting Linux/amd64. Is anyone concerned by that?

Attached: java.png (518x518, 39K)

Other urls found in this thread:

github.com/jnode/jnode
twitter.com/SFWRedditImages

This isn't reddit, fuck off.

Rust-fag detected. Don't you have a compiler bug to chase?

so how about that string += bug

>most popular programming language in history
In India, that is.

github.com/jnode/jnode
>there is an OS written entirely in Java

Attached: 1528166414446.png (400x400, 70K)

The most interesting news I see on the Java community is this Graal compiler. Is like Java is winning the race tbhfam.

can anyone explain this shit to a unit testing newb?

Attached: why.png (735x79, 8K)

Let us see that getDigits method. Betting it has something to do with how it scrapes the integers from the string being passed in.

Java is good, but it attracts shitty programmers.
I would be more productive in Java than C++ but I need the control and performance that C++ can deliver.

It's a list of Integer, i.e. a list of (references to) objects.

So it's entirely possible that the list is not empty but contains null references. The method getDigits is probably bogus.

Attached: getdigits.png (543x286, 11K)

>there is an OS written entirely in Java

Attached: 1527487975611.jpg (750x743, 88K)

I don't know much about regex but the for-each loop an the if statement inside it look problematic.

Why is is token.length() > 2 and not just > 1?

Why not split the original string into a char[] array instead and iterate over each item in that using the for-each loop and using the Character.isDigit() method in the if statement instead of some over-complicated regex fuckery?

>Unironically liking java
Where do I sign up?

The exercise wants me to return 3 or more consecutive numbers(e.g. 344, 6775), hence why I added the condition that the length should be more than 2.

The regex itself is suppose to split them into digits, at least thats what it says when I copied it. When I used the debugger, it showed that the returned Integer list contained two(same number of consecutive digits in the String parameter passed), but I still dont get why the list contains null references.

>The regex itself is suppose to split them into digits, at least thats what it says when I copied it.
There's your first problem.

Never just copy-paste code and assume it will work for your unique situation without thoroughly understanding what the code does.

The way I'd do it wouldn't look as elegant as that weird regex thing you have but would work much better.

Use parseInt(token) instead of getInteger(token)

This would probably work.

Integer.parseInt() is the best way to go from String to int.

Daily reminder that OOP backwards is POO.

Attached: 1528851026543543360.png (518x518, 52K)

>java is finally shedding ee

B A S E D
A
S
E
D

holy shit. thanks.

>Never just copy-paste code and assume it will work for your unique situation without thoroughly understanding what the code does.
The only thing I copied was the regex itself("\\D") from documentation, but I appreciate the reminder anyway. It's all fixed now user