Java Polls

46 posts

Java Polls

Java Polls

@JavaPolls

Polls related to Java. Learn from the opinions of the community.

Katılım Temmuz 2022
1 Takip Edilen26 Takipçiler
Java Polls
Java Polls@JavaPolls·
There is another interesting library for null-safety in Java called JSpecify: jspecify.dev/docs/user-guide But its not listed above as option because it is not sufficiently used yet.
English
0
0
0
58
Java Polls
Java Polls@JavaPolls·
How do you deal with nullability in Java? Comment if none or combination of these.
English
1
0
1
1.1K
Java Polls
Java Polls@JavaPolls·
@cmogoncalves That is a good approach. And perhaps when the type is too long with nested type-parameters.
English
0
0
0
22
Java Polls
Java Polls@JavaPolls·
As a Java programmer, I use var (local variable type inference)… If your answer is “sometimes”, comment why/when.
English
0
0
2
1.6K
Java Polls
Java Polls@JavaPolls·
This does not happen while evaluating expression 'p1 instanceof Point point' and therefore x() and y() methods don't get executed.
English
0
0
0
0
Java Polls
Java Polls@JavaPolls·
The correct answer is C. The expression 'p2 instanceof Point(int x, int y) point' not only matches p2 with Point to create a variable point, but also deconstructs it into variables x and y. To do that it uses accessor methods x() and y() and therefore they get executed.
English
1
0
0
0
Java Polls
Java Polls@JavaPolls·
What do you think will be the output of this, assuming you run it with Java 19 (preview enabled)? See poll below.
Java Polls tweet mediaJava Polls tweet media
English
1
0
1
0
Java Polls
Java Polls@JavaPolls·
Which cloud service do you use for your Java applications?
English
1
0
0
0
Ahmad Bawaneh 🇵🇸 🇯🇴
Ahmad Bawaneh 🇵🇸 🇯🇴@AhmadBawaneh1·
@JavaPolls @dominokit Yes we use #GWT as a compiler but also compatible with #j2cl we don't use #GWT widgets, all components are elements based, we are now in the process of making a new release with theming support and will be a start for implementing templating and bi directional databind.
English
1
1
3
0
Java Polls
Java Polls@JavaPolls·
For your Java backends, what do you use on the frontend? Java, JavaScript or something else.
English
3
0
1
0
Java Polls
Java Polls@JavaPolls·
@GKlijs True. orElseThrow() is much better name than get(). It depicts the side effect clearly.
English
0
0
1
0
💻Gerard Klijs🦀
💻Gerard Klijs🦀@GKlijs·
@JavaPolls Semantically it's different through. I like it as a quick way to handle them, where when needed a specific exception can be put in later.
English
1
0
1
0
Java Polls
Java Polls@JavaPolls·
Optional: what do you think about it?Choose from: 1. It has helped improve null-safety/ readability 2. It could have been designed better 3. Both For any of the choices, if you want to provide arguments, the comments section is open.
English
2
0
2
0
Java Polls
Java Polls@JavaPolls·
@GKlijs That’s true. The no-argument one was not present in Java 8. In fact, it does exactly the same thing as get(). Perhaps they want to deprecate get() which would be a good thing for Optional.
English
1
0
1
0
Java Polls
Java Polls@JavaPolls·
@GKlijs orElseThrow() was there in Java 8. But some good additions were done later on like or(), ifPresentOrElse(), stream(), filter(), map() etc. One problem is get() looks so innocent, but it throws an exception for the “empty” scenario.
English
1
0
1
0
Java Polls
Java Polls@JavaPolls·
Preview features are provided with a JDK release for developers to experiment with them and provide feedback. Have you ever used preview features for any JDK release?
English
0
0
2
0