Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to learn Java

Status
Not open for further replies.

Rienes

Programmer
Mar 15, 2021
2
UA
Hi all!

I've got a simple but really important question for me. I've faced the challenge of learning a new programming language (Java especially) but dunno which option to choose. Some of my friends suggest online courses, some - books, and lectures of software developers (there are a lot of them on the web).
Does anyone have such an experience? How long did it take for you?
I wonder if there is a possibility not to spend years and years on the basic level of Java? Presume, that practice can give me more but being like a complete nub doesn't seem exciting.

So share your ideas or career tips, please.

 
It all depends on where you are now, i.e. in which programming language you work, what kind of experience you have and what do you want to learn in Java. Simply to say, learning java is a very broad area.
The basics of the Java programming language are not difficult, but then learning the advanced stuff takes a lot of time. And above all you should be working on a real project, without that you won't really learn - that's my opinion.
Last year I got involved in some projects with Spring Boot.
In a short time I had to learn a lot of new things: how to work with Spring Data, Swagger, then with Mongo and Kafka.
Although I already had some experience and developed some Java Server Faces applications a few years ago, everything here was new to me.
So, during working hours I programmed the project tasks and additionally after working hours, i.e. in the evenings and weekends, I experimented with my own toy projects in order to learn and understand these new things. I have to say it was very dynamic, very exhausting and when the projects ended and I went back to my original job at IBM Midrange, I felt like I was on a vacation.
But at the moment I'm a bit bored in my work and would like to participate in such a project again.
 
First question is what are you going to use Java for? Remember that Java changes every few years. When I first learnt it back in the early 90s, it was changing every 3 months. Some of the stuff you find on websites are quite outdated so always check the date when the article was written.
[ul]
[li]General programming for running on a PC[/li]
[li]General programming for creating GUIs etc on a PC[/li]
[li]Web pages[/li]
[li]Android programming[/li]
[li]Use in frameworks[/li]
[li]Just need to know the basics - more interested in build environment[/li]
[/ul]

If you are absolutely new or have some programming experience in a different language, start with general programming for running on a PC. Watch out for the gotchas if you are coming from C++: especially object assignment. Java and C# have shallow copies. Java, like C# is a language that needs a reasonably fast machine. Like C#, you can force garbage collection or what for the program to do it.

Creating GUIs - choose your GUI engine. You have AWT, Swing and JavaFX. JavaFX is the newest but Oracle is withdrawing support for it because not many people are using Java for creating GUIs. AWT is the oldest but it is really basic.

Web pages - not much use since it won't work without JRE being installed. Not many sites will do Java web pages

Android - this is quite complex. The calls are complex, the environment is complex. Lots of stuff to think about. Not good for a noob. Get to the point where you are comfortable with the language before you try this. You have to look up almost every parameter of every call.

Build environments - some are simple some are complex. Initially there was make, then ant, maven, gradle.

IDEs - you can do everything from command line or you can use an IDE. Common IDEs are netbeans and eclipse but there are others. If you are using anything written in Java, like eclipse, get a reasonably fast machine. On my 2GHz, 8Gb Toshiba i3 laptop, I can click on Eclipse but nothing happens for about 10-15 seconds. Then an icon may pop up and eclipse will pop up about 1 minute later. If you have a slow machine, be prepared to wait if you are using an IDE. Also, don't expect immediate responses. You may click on something and nothing will happen and then suddenly something happens. Once everything is cached, it might be a bit faster.
 
Thank you very much! It's really helpful for making some step-by-step guide for myself while learning.
I'll take into account your tips. Great to hear the real experience from those who are into programming and face these challenges every day.
I'll start from the basics anyway and then move forward. Friends of mine suggested having a look at CodeGym, Codeacademy and so on to catch the basics.

Cool moment with toy project,@mikrom, I guess it's a source for the practice and new ideas. Boring stuff doesn't push anyone to create smth new. That's why I'd like to participate in any project where one can express his ideas and develop them in an unusual way.
Thanks a lot.

Thank you for your suggestion regarding machine capacity, @xwb. I wasn't aware of this feature.
Yeah, Android apps sound interesting but too complicated for me at the moment. It can wait for a while [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top