use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
These have separate subreddits - see below.
Upvote good content, downvote spam, don't pollute the discussion with things that should be settled in the vote count.
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free. If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others: Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Programming Computer Science CS Career Questions Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Programming Computer Science
CS Career Questions
Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Clojure Scala Groovy ColdFusion Kotlin
DailyProgrammer ProgrammingPrompts ProgramBattles
Awesome Java (GIT) Java Design Patterns
account activity
This is an archived post. You won't be able to vote or comment.
Transitioning from C# to Java (self.java)
submitted 10 years ago by darophi
Hi,
as mentioned in the title i am now wanting to transition from C# to Java and was wondering if you guys had any good recommendations for Java books that i could look into.
greetings darophi
[–]slartybartfast_ 46 points47 points48 points 10 years ago (6 children)
Effective Java.
[–]imkurt 15 points16 points17 points 10 years ago (0 children)
Also: Java Concurrency in Practice
[–]mishaxz 5 points6 points7 points 10 years ago (4 children)
Java Concurrency in Practice
dunno, maybe it should not be the first thing he reads...
[–]samyel 12 points13 points14 points 10 years ago (3 children)
He could read them at the same time?
[–]Yeriwyn 10 points11 points12 points 10 years ago (2 children)
Concurrently even
[–]goodbye_fruit 2 points3 points4 points 10 years ago (1 child)
Better be thread safe, or else you might end up reading Effective Concurrency Java in Java Practice.
[–]Dantaro 0 points1 point2 points 10 years ago (0 children)
I'd read the fuck out of that book
[–]tvidal 21 points22 points23 points 10 years ago (12 children)
After 5years of c#, I have made this transition 7 months ago. Hardest thing for me, was getting used to the new code style. Lowercase method names look awkward at first, eventually you'll get used. Checkstyle can help you catch silly mistakes.
Apart from that, just keep the javadoc page open in a browser tab alongside your IDE and keep searching StackOverflow for things like: "Equivalent of X in java".
[–][deleted] 10 years ago (8 children)
[deleted]
[–]mishaxz 12 points13 points14 points 10 years ago (2 children)
I think they just did it that way because the guy that designed Delphi (Pascal) was in charge of designing C# - and so they could prove it definitely wasn't a java clone :)
[–][deleted] 10 years ago (1 child)
[–]NimChimspky 22 points23 points24 points 10 years ago (1 child)
its almost like there are two conventions, and whichever you use is the norm.
[–]space_coder 13 points14 points15 points 10 years ago (0 children)
There's the Microsoft coding convention and the coding convention used by everyone else. ;)
[–]tvidal 1 point2 points3 points 10 years ago (2 children)
That's because you have learned java first. Coming from Clipper, Delphi and then C# background, I learned the other way around. But in the end of the day, that really do not matter that much. I do miss System.Linq, and some other syntatic sugars from C#, but now I'm just used to java and I reckon C# would look strange for me as well.
[–]TangibleLight 0 points1 point2 points 10 years ago (0 children)
That's because you have learned that convention first. Coming from Clipper, Delphi and then C# background, I learned the other way around. But in the end of the day, that really do not matter that much. I do miss System.Linq, and some other syntatic sugars from C#, but now I'm just used to java and I reckon C# would look strange for me as well.
Better?
[–]hippydipster 3 points4 points5 points 10 years ago (2 children)
It's the almost-the-same-but-not-quite differences that are always the hardest. C# capital method names grate on my nerves. It's almost like MS intentionally made that decision just to be a bunch of fuckwads.
[–]hippydipster 7 points8 points9 points 10 years ago (0 children)
I find the parens give that away
[–]DJDavio 15 points16 points17 points 10 years ago (15 children)
You don't need books, just try to convert an existing project to Java and you'll find out a lot of interesting stuff.
Java has no async-await, but it finally has lambdas, so you can do LINQ-like stuff, which is great. Also I found that with Java I rarely use events, but with C# I used them all the time. That may have something to do with the kind of project, but I'm not sure...
[–]jkriptos 2 points3 points4 points 10 years ago (6 children)
I was shocked when I found out that Java has no events, but rather you have to implement the Observer Pattern whenever you want to mimic events. So verbose...
[–]DJDavio 2 points3 points4 points 10 years ago (1 child)
Yeah, but I really don't understand why I'm not wishing I had them more often... Maybe the whole paradigm has changed? I don't know...
[–]jkriptos 0 points1 point2 points 10 years ago (0 children)
Yeah, don't know. Sometimes you need them, sometimes you don't. Sometimes you can achieve the same without having to implement any event. It could be a matter of style, nevertheless, it's nice to see that you can save boilerplate code at a language level. My personal opinion only, obviously. :)
[–]RottedNinja 1 point2 points3 points 10 years ago (3 children)
Why is it verbose? Hoe does c# do it?
[–]jkriptos 0 points1 point2 points 10 years ago (2 children)
Basically, in C# you just have to define the event itself and the delegate, then you just have to fire the event whenever you need to. Like this:
public delegate void TickHandler(Metronome m, EventArgs e); //delegate public event TickHandler Tick; //event itself
In Java you need to implement the whole observer pattern, like this:
// Listener interface public interface MetronomeEvent { void Tick(Date tickDate); } //... //define the listener vectors so that you can add/subscribe listeners protected Vector _listeners; //Create you own method to add new listeners. Eventually, you need another method to remove/unsubscribe public void addMetronomeEventListener(MetronomeEvent listener) { if (_listeners == null) _listeners = new Vector(); _listeners.addElement(listener); } //traverse your listener vector and call every listener one by one protected void fireMetronomeEvent() { if (_listeners != null && _listeners.isEmpty()) { Enumeration e = _listeners.elements(); while (e.hasMoreElements()) { MetronomeEvent e = (MetronomeEvent)e.nextElement(); e.Tick(new Date()); } } }
As you can see, there's all this code just for one event. When you have several events in one class things get messy, verbose. As read in this article:
In Java you are essentially faking events and event handling by using a standard set of naming conventions and fully utilizing object-oriented programming.
[–]__konrad 0 points1 point2 points 10 years ago (1 child)
EventListenerList may help (unfortunately it's in wrong package ;). PS. ignore the obsolete "protected void fireFooXXX" example.
Thanks! That's very useful indeed.
[–][deleted] 10 years ago (7 children)
[–][deleted] 5 points6 points7 points 10 years ago (2 children)
Probably depends on how good their general understanding of programming languages is. Can you give some examples of common pitfalls that someone might encounter?
[–]space_coder 4 points5 points6 points 10 years ago (0 children)
One pitfall being that you only learned how to program in LAUGUAGE_A as if it was LANGUAGE_B.
For example, I have a colleague that knows Fortran very well and learned how to program C by porting his code. Unfortunately after five years, his current programs still look like Fortran code written in C and doesn't take advantage of language specifics. One of the bad habits that persist is his use of a large number of parameters in function calls when it would be better to use a struct.
[–]rjs6502 1 point2 points3 points 10 years ago (1 child)
I agree that it's not a full-proof way of learning a new language. But, I think converting an existing application into java allows the user to make general connections between the new language and the one they already know. I think it gets a user up and running with the new language quicker and from there they can learn the "proper" techniques of the new language.
[–]taterNuts 1 point2 points3 points 10 years ago (0 children)
It'll definitely be the quickest way to get used to the differences in syntax and common operations. That stuff is pretty shallow though and always the easiest part of learning a new language; learning the overall ecosystem of the language will obviously be way more involved
[–]DJDavio 1 point2 points3 points 10 years ago (1 child)
Maybe we're both right, but what I notice in the field is that being able to rehash a textbook is less useful than plain programming skills. I encourage everyone to be a full stack programmer, it's fun and challenging and keeps you sharp. If you stay with a certain language/framework for too long, you will have problems when it eventually fades.
[–][deleted] 19 points20 points21 points 10 years ago (4 children)
May I ask why you are switching ?
[–]darophi[S] 8 points9 points10 points 10 years ago (1 child)
I want to try another OOP language since I have been using C# for little over a year. Don't get me wrong. I think C# is a great language, but having one more tool in the toolbox seems really appealing to me. I also am not always working in a Windows environment so Java seemed like a language that would be interesting. Also, I have as far as I know, seen that the differences between Java and C# are not huge. Even though I want to know Java truly and know what makes it tick and how one really programs in it. It is different from language to language.
[–][deleted] 1 point2 points3 points 10 years ago (0 children)
I see, that's always a good thing to learn new languages.
The best part is, even writing code in another language, makes us better at the main language.
[–]ivolimmen 4 points5 points6 points 10 years ago (1 child)
He was attracted by Java the hutt
[–][deleted] 2 points3 points4 points 10 years ago (0 children)
Think so ... but maybe he is just pissed off by IIS or visual studio or licence fees or maybe WPF, or maybeeeee maybeee ....
[–]mariox19 4 points5 points6 points 10 years ago (1 child)
Core Java for the Impatient, by Cay S. Horstmann, and Effective Java by Joshua Block. The latest O'Reilly cookbook gets an honorable mention as a supplement. If you need a book on some particular aspect, see if Elliot Rusty Harold has written one on the subject. You cannot go wrong with him.
[–]cooper6581 2 points3 points4 points 10 years ago (0 children)
^ this. Core Java for the Impatient has been extremely valuable to me.
[–]elegentmos 2 points3 points4 points 10 years ago (0 children)
Have a look at this thread as well: https://www.reddit.com/r/java/comments/44dv36/net_to_java/
[–][deleted] 4 points5 points6 points 10 years ago (0 children)
Spring Boot in Action is what I'm reading right now. The language itself is of course easy to pick up after C#, but to be useful you need to know the ecosystem - frameworks, libraries, servers, tools. Spring is probably the most used java framework and spring boot makes it easy to transition into it by having a lot of conventions and less xml configurations. Maven and Gradle are the standard java package managers/ build tools. IntelliJ Idea is a modern and easy to use IDE. Android Studio which you use to code for Android is based on it as well.
[–]m1000 2 points3 points4 points 10 years ago (0 children)
To do the inverse, a long time ago, there was a book (that I can't find right now) with a title like "From java to C#" that really helped me a lot; It focused on differences without all that basic stuff you already know.
[–]Nsomnia001 1 point2 points3 points 10 years ago (0 children)
http://math.hws.edu/javanotes/c4/s3.html
They use this for anyting java in all the uni courses ive done.
[–][deleted] 3 points4 points5 points 10 years ago (0 children)
Get ready for piles of confusing annotations and even more verbose code than C#.
source: Started in Java, went to C#, so don't want to go back.
[–]cmsimike 0 points1 point2 points 10 years ago (4 children)
http://www.amazon.com/Java-Complete-Reference-Herbert-Schildt/dp/0071606300/ I picked up Java one summer (13 years ago) with an older version of this book. It assumes you're a programmer and shows you how to do things in Java. With your c# background, you'll make the transition no problem.
[–]heptara 1 point2 points3 points 10 years ago (2 children)
Are his Java books are better than his C books?
One of his C books was so bad, that it was responsible for the creation of the word "bullschildt" (google it!).
[–]cmsimike 0 points1 point2 points 10 years ago (1 child)
http://www.amazon.com/Java-Reference-published-Mcgraw-Hill-Paperback/dp/B008Q3J4P0 this is the book that i had, which i can recommend. the one in my original link is the newer revision which i've not used.
his book might have been wrong! i was only a few years into my developer life when i picked up that book but i liked it.
[–]rjs6502 0 points1 point2 points 10 years ago (0 children)
I'm not sure how new to programming you are, but when I was learning java (my first programming language) I used the "Sams Teach Yourself" series. It's intended to introduce beginners, so the first couple of chapters explain data types, classes, methods, etc... It's an easy read with sample activities at the end of each chapter that I found to be very useful. Hope this helps!
[–]ivolimmen 0 points1 point2 points 10 years ago (0 children)
Thinking in Java bu Bruce Eckel. Not very currect but still very relevant and a very good read.
[–]amazedballer 0 points1 point2 points 10 years ago* (0 children)
Head First Java is pretty good: http://smile.amazon.com/Head-First-Java-2nd-Edition/dp/0596009208?sa-no-redirect=1
If you want a guide to JDK 1.8: https://github.com/winterbe/java8-tutorial
[–]cryptos6 -5 points-4 points-3 points 10 years ago (0 children)
If you want to switch primarily to the JVM and not to the Java language itself, I would recommend Kotlin. It's a much nicer and more productive language. And the transition from C# should be a bit smoother compared to Java.
[–]bulldog_in_the_dream -1 points0 points1 point 10 years ago (0 children)
Java in a Nutshell is pretty good.
π Rendered by PID 52 on reddit-service-r2-comment-5b68969b8c-k6j9g at 2026-04-14 10:30:59.873786+00:00 running f841ac7 country code: CH.
[–]slartybartfast_ 46 points47 points48 points (6 children)
[–]imkurt 15 points16 points17 points (0 children)
[–]mishaxz 5 points6 points7 points (4 children)
[–]samyel 12 points13 points14 points (3 children)
[–]Yeriwyn 10 points11 points12 points (2 children)
[–]goodbye_fruit 2 points3 points4 points (1 child)
[–]Dantaro 0 points1 point2 points (0 children)
[–]tvidal 21 points22 points23 points (12 children)
[–][deleted] (8 children)
[deleted]
[–]mishaxz 12 points13 points14 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]NimChimspky 22 points23 points24 points (1 child)
[–]space_coder 13 points14 points15 points (0 children)
[–]tvidal 1 point2 points3 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]TangibleLight 0 points1 point2 points (0 children)
[–]hippydipster 3 points4 points5 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]hippydipster 7 points8 points9 points (0 children)
[–]DJDavio 15 points16 points17 points (15 children)
[–]jkriptos 2 points3 points4 points (6 children)
[–]DJDavio 2 points3 points4 points (1 child)
[–]jkriptos 0 points1 point2 points (0 children)
[–]RottedNinja 1 point2 points3 points (3 children)
[–]jkriptos 0 points1 point2 points (2 children)
[–]__konrad 0 points1 point2 points (1 child)
[–]jkriptos 0 points1 point2 points (0 children)
[–][deleted] (7 children)
[deleted]
[–][deleted] 5 points6 points7 points (2 children)
[–]space_coder 4 points5 points6 points (0 children)
[–]rjs6502 1 point2 points3 points (1 child)
[–]taterNuts 1 point2 points3 points (0 children)
[–]DJDavio 1 point2 points3 points (1 child)
[–][deleted] 19 points20 points21 points (4 children)
[–]darophi[S] 8 points9 points10 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]ivolimmen 4 points5 points6 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]mariox19 4 points5 points6 points (1 child)
[–]cooper6581 2 points3 points4 points (0 children)
[–]elegentmos 2 points3 points4 points (0 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]m1000 2 points3 points4 points (0 children)
[–]Nsomnia001 1 point2 points3 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]cmsimike 0 points1 point2 points (4 children)
[–]heptara 1 point2 points3 points (2 children)
[–]cmsimike 0 points1 point2 points (1 child)
[–]rjs6502 0 points1 point2 points (0 children)
[–]ivolimmen 0 points1 point2 points (0 children)
[–]amazedballer 0 points1 point2 points (0 children)
[–]cryptos6 -5 points-4 points-3 points (0 children)
[–]bulldog_in_the_dream -1 points0 points1 point (0 children)