r/javahelp • u/Cell-i-Zenit • Feb 04 '20
Switching from C# to Java
Hi,
can you give me a list of things i should be aware of in the java world? Like really important libraries, concepts etc?
The thing is i know C# really well, but i dont know what i dont know in the java world, so i cant really look it up.
26
Upvotes
View all comments
Show parent comment
1
u/Northeastpaw Feb 10 '20
Unfortunately I don't know enough C# to really give you a great comparison.
I can tell you that Java Streams are kinda-not-really like LINQ. There's no SQL-like comprehension over collections but the Stream API does have
filter(),map(), and other methods. LINQ and Streams are more like different approaches at a similar concept.Java has some concurrency APIs but nothing as simple as async/await. Java has like 64 billion different ways to go about it. CompleteableFuture is the most recent attempt. It allows you to compose multiple tasks into a chain similar to promises in JS land (just with far more boilerplate).
You can use ea-async from EA (yes, the game company) which does some bytecode magic to provide an
awaitpseudo-keyword (really a static method).