I use IntelliJ on a 10-year-old laptop with 8GB RAM and it runs fine. The system requirements say 2GB minimum, 8GB recommended, and 2.5GB hard disk space.
Hope that helps!
Poorly written code generally doesn’t follow Best Practices, but includes issues like using inappropriate algorithms and data structures to manage data, and bad design decisions.
I recommend Clean Code by Robert Martin https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882
He does a great job of highlighting what makes code readable, and maintainable, especially in the context of Java and OO Design and OO Programming.
I’ve heard some call it controversial. But after more than 20 years in the industry ( username relevant) I find him to be particularly on point and accurate. Personal preference aside, he knows what he is talking about and tells it like it is.
Check out the Android Development for Beginners course on Udacity.
It's split into 5 parts, the first part teaches you basic XML for designing layouts and a user interface for the app, and the second part onwards deals with Java.
The course assumes you have 0 coding background, so they explain everything in an easily accessible way, it's not heavy with the terminology, more to do with the concepts.
One of the best ways to learn a new language is to solve exercises and typical code interview questions with the new language. I highly recommend you just start solving problems at i.e., https://leetcode.com/problemset/all/. If you are familiar with coding, basic math and some algorithms from college, you may have an idea how to solve the problems, and what remains then is googling how to do them in Java. This will also get you accustomed to typical programming tests.
I might've suggested something else of you wanted to learn full stack Java development with typical project work, but in your case I think this is a really good approach.
Either way, good luck!
Sorry, but you need to put way more effort in your posts if you want to get proper help.
We, as commenters should never need to ask you as poster for extra information. It is your responsibility to provide it in your original post.
Preparing a well designed, proper post is some form of appreciation of the work that others will do in their spare time to help you.
AIDE is an IDE that runs on Android and can do java development (among other langs).
If they have access to an internet connection there are web hosted options too.
IMHO books if you're an absolute beginner (which you are).
You need a solid foundation, few online courses can give you that.
My favorite, very pedagogic writing style
Head First Java is also reknown (the teaching style just happens to not be my cup of tea) .
Both books are well known, you can find them online.
For Dummies books certainly aren't the best, but they generally aren't bad either. I would recommend checking out the reviews on Amazon, can usually find some good info there.
As for other books, Head First Java is a personal favorite.
I use the Cloud9 IDE, set up a project for basic ubuntu and install java on it.
Edit: In case you're not familiar with linux, I use this link whenever I install java on it.
There really aren't any certifications needed to get into the software development world. I recommend to do some side projects that help build yourself a profile to display your level of skill. They don't need to be 5 star apps that have never been thought of before and useful to people, just code that'll show you know the fundamentals of OOP and other paradigm's. You can get ideas from sites such as a to-do list, an inventory system, etc.
I recommend starting out with the book Head First: Java. Then, another book called Effective Java. This book has a 3rd edition coming out in October, so see if the first book can hold you over till then.
Effective Java (2nd Edition) by Joshua Bloch. It was written for Java 6, but the items that are discussed are general in nature and not prone to becoming obsolete. I've learned a lot about Java (as well as code design in general) by reading it, and it's arguably the go-to book for Java code design. It's style is intentionally similar to Effective C++ and the other books by Scott Meyers, just for Java instead of C++.
Core Java Vol I and II are great if you know what you're looking for. I don't think it's a good book for a beginner looking to get their feet wet. Assuming /u/super-olive is a complete beginner, Head First Java, whilst not perfect, might be a better fit.
Good on you making something useful to learn to use Java; the main thing I would say is you need to start utilizing Java's object oriented nature to help clean up your code. I would highly recommend reading Robert Martin's Clean Code as it will show you how to make your code not only functional, but readable and maintainable.
Also, posting your github code is probably enough for a place like this. I can't speak for everyone else, but I am never going to run an executable linked by someone in a forum (even if I know them).
On Android, you can download AIDE to program in Java.
Please, for future, mind your language. The way you write is not acceptable in a technical subreddit. We do not tolerate 4 letter words here.
Spring is largely based on DDD (Domain Drive Design) When you get into any real professional java development, you need to understand how to abstract and model a business domain.
https://dev.to/colaru/creating-a-domain-model-rapidly-with-java-and-spring-boot-i85
Java console applications can't be started with double-click, because Sun/Oracle stupidly didn't implement something into the JVM that would optionally open a console.
The standard suggestion here is to make a batch file which executes "java -jar myprogram.jar" and just deliver that with the application.
Another way is to use a launcher utility. I have made very good experiences with http://launch4j.sourceforge.net/ which e.g. allows you to deliver your own JVM with the program without requiring an install on the user-side. You just copy your JVM in (and possibly strip a few things, e.g. JavaFX if not needed, and once Java 9 is out, you'll probably have a blast stripping it down to the bare minimum you need). It also turns your jar into an exe with icon, so that it integrates flawlessly with Windows like any other application. Optionally, you can even show a spash screen while the application loads.
Finally, I just created a Java class that enables double-click for console applications, all you have to do is add the class and add one call at the start of your application.
It currently only works on Windows, but it is prepared for other systems, so if you know the necessary command line strings, you can just put them in and it should work. Please let me know if you have any so that I can extend this.
Yes, not a lawyer here but they are pretty clear that the community edition can be used for commercial purposes - https://blog.jetbrains.com/pycharm/2017/09/pycharm-community-edition-and-professional-edition-explained-licenses-and-more/
> Can I use PyCharm Community Edition at work?
>Yes, you can. You are allowed to use PyCharm Community Edition for commercial use.
Same for Community edition IntelliJ IDEA for Java - https://www.jetbrains.com/idea/
> Community Edition is open-source, licensed under Apache 2.0. Projects like Android and Swift use Apache 2.0, so you're in good company. It can also be used for commercial development.
Something's not adding up. You say you're taking beginner tutorials but get bored because they're too basic, but then you have gaps in knowing about things like classes and methods... but those are the basics. In any standard java book, there's only like two chapters of stuff before classes and/or methods.
I think it might be a good idea if you go back to beginner's tutorials and just stick with it past the parts you think are too basic. I suspect you'll find they're far shorter than you think.
For what it's worth, some of the learning resources I liked the best are:
John Purcell's video tutorials at caveofprogramming.com
Derek Banas's java video tutorials on youtube
and perhaps surprisingly, the Java programmin for android development for dummies book by Barry Burd. It's far more java focused than android focused (it's actually disappointing if you want to use it for android) but the 90% of it that's java focused is really good for learning java.
I also did the mooc helsinki course, but that was well after I had done the other resources and I didn't find it very fulfilling, though it's usually the first recommended resource on here so you might have a different experience. I found it was more syntax focused and less concept/explanation focused, but that's just me.
I also didn't find much use out of the Head First Java book that's so popular on this sub, but you might.
You can start with CodeAcademy to make yourself feel good about yourself and to feel like its easy. Look for Java101 on youtube and the dude walks you through an entire text game that uses a ton of concepts. Also, try out Head First Java the book...Programming by Doing: Java is a cool site...and I'm taking the HKUST class on edX but it kind of pisses me off, but I am determined to complete the sequence (I want a cert)...class is free if you don't want the cert. This is all the stuff I'm doing in Java. Start with CodeAcademy its freaking simple.
Udacity's Intro to Programming with Java course wouldn't be a bad start. It's free and self-paced. Strong focus on exercises, which is nice for learning by doing, rather than just lecture.
Although, I'd start by at least acquainting yourself with the very basics first, as the course does sort of just skimp over those a bit. Oracle's official Java tutorials are good for that. Just stuff like primitive data types, classes and objects, and methods (you should at least be able to code Hello World, and do some very basic math with variables (in Java code, that is) before taking the course). That should be a good enough primer.
You might look up the book Java Puzzlers by Josh Bloch and Neal Gafter
https://www.amazon.ca/Java-Puzzlers-Traps-Pitfalls-Corner/dp/032133678X
Discounting class assignments, I made a Android app displays quotes fetched via the Quotes on Design API.
GitHub: https://github.com/cedricium/quotr
Google Play: https://play.google.com/store/apps/details?id=com.ccc.cedricamaya.quotr
Simple answer: read "Clean Code" by "Uncle Bob" Robert C. Martin
Methods are entities. The SOLID Principle basically dictates when to create methods.
Your one-liner methods are overkill IMO that don't add anything to the readability of the code.
Methods help organizing code and should make code cleaner and easier to read.
I'd love to recommend you "Effective Java" but I'd say that book is more about refining your skills, not to build a basis. Not sure if it would suit your skill level. It's like a collection of best practices along with explanations for them. I learned a ton from it.
IMO Effective Java was a great book and still is. I don't know what is typically asked in interviews, but one thing that changed how a lot of code looks like recently are the new Java 8 features like Lambdas, Streams, Optional or Supplier (a functional interface) used in your code snippet; so you might want to take a look there, especially because it would show (at least to me) that you can get up to speed on newer developments.
I have seen a developer who pair-programmed with a master every day for 2 months and was almost proficient. As in, he was good enough to write and design the code, but seriously lacked confidence in his decisions due to lack of experience.
On your own, I'd say a minimum of 4 months, 8 hours every day. And there is some required reading that you have to get through in addition to learning a language.
Clean Code by Robert Martin
Working Effectively in Legacy Code by Michael Feathers
Java and Javascript have nothing to do with each other aside from the fact that they are both programming languages.
But regarding your question, theres nothing particularly complicated about your app. It will be a lot of work as your first project just because there is a lot of scope to it - you need a web server, a database, and a domain layer to tie it all together. There is a lot to learn about each part, but the best way to learn is to dive right in.
I recommend a Head First Java book to get the java part down. You can apply the knowledge there to create all the objects and logic of your app, and create and interact with a database too. Once you've got that all down, you can work on the front end - whether that means a web app, or a mobile app or whatever. Don't give up or get overwhelmed, just take the project one piece at a time!
I've never used it but I've heard Effective Java is a great book for people who have programming experience already.
I don't know if you're looking to buy a physical book or not but here's the PDF so you can take a look anyway. LINK
^^^^^^Inb4 ^^^^^^"Piracy ^^^^^^is ^^^^^^bad"
> Other question: how do I format this into the readable lines I see on here?
About your problem:
You are overstepping the Array boundaries of the T
array in your for
loop:
for (i = 0; i <= T.length; i++)
You run the for loop until i == T.length
, which is a problem. An Array of length
has the highest array index length - 1
since array indexes start at 0
, not at 1
.
Your statement that the code runs "fine" when you remove the for
loop can be explained by the for
loop. Once you run the for
loop, you will receive an ArrayIndexOutOfBounds
exception which will stop the execution and thus also not print the while
loop.
Your for
loop should be:
for(i = 0; i < T.length; i++)
or
for(i = 0; i <= T.length-1; i++)
Your second do-while
loop actually produces the same problem with the same runtime exception.
It also needs to be:
while(j < T.length);
This is a common beginner's mistake. Always be wary of your array indexes when looping!
Don't get too hung up on it though, do your best to present your strengths that might benefit the company, and try to handle the programming problem with a level head.
I do a lot of interviews and the programming problem I ask is standardized, but I expect people of different levels to handle/perform it differently. Often I'll even help people through the problem if they are able to communicate and take advice when offered.
Keep in mind that how you work and communicate with the interviewer is a big part of those tests. It's largely about getting some insight into how you work and communicate. If the tests are not relevant to the job, the interviewer will know that and take it at least somewhat into consideration for the role.
Thats a good one.. Codegym.cc .. It has the ability to let you browse through the lessens and pick the parts you need at a particular moment.. Cool!!! Its free ( right?) and much bigger even the one I bought at Udemy..
​
No need to search any further.
​
~ muchas gracias ~
I took this example from Codegym.cc, a phenomenal site for learning java (its free too.)
​
abstract classes determine what behavior a child class should execute. In the example below different bodyguards may know different types of martial arts, all bodyguards know a type of martial arts. Therefore, when you create a bodyguard named Floyd, he has to know a martial art, perhaps sumo; while bodyguard named Connor knows Jujitsu, and another named Hogan knows wrestling. They also may have different types of guns. Its very similar to interfaces, except it is a way for a parent to regulate childrens behaviors, while interfaces standardize behaviors across classes.
​
​
abstract class BodyGuard{
abstract void applyMartialArts(Attacker attacker);
void shoot(Attacker attacker){ gun.shoot(attacker); }
void saveClientLife(Attacker attacker) { if (attacker.hasGun()) shoot(attacker); else applyMartialArts(attacker); } }
The BodyGuard class determines how to deal with an attack: shoot or use martial arts.
However, the specific martial art is not specified, though we are certain that the skill exists.
We can create several different bodyguards (by inheriting this class). All of them will be able to protect the client and shoot the attacker.
>EDIT: Also this guy programs java related stuff in Eclipse. There is anything from for loops, to gui's and more advanced stuff.
That's one of the most discouraged resources on the net. Bucky == theNewBoston who is listed amongst the worst programming resources possible. Here is a discussion about that
Check out Udacity. They have a course that was created by Google on how to develop android applications. You can either pay for it and take it like it's a class and get graded on your work/code reviews by them/etc. or use the free courseware where you can still access all of the videos and such.
Edit: https://www.udacity.com/course/ud853
I wanted to add the link for you :D
Exactly what /u/sadjava said. Having a main method's crucial for a java program to do something.
Luckily, eclipse has a solution: here's a similar question on stackoverflow. They'll describe how to create a shortcut for writing the main method.
Hope this helps!
Two of my favorites:
CodingBat has free code practice : http://www.codingbat.com/java
Coderbyte has free code challenges: http://www.coderbyte.com/language/First%20Factorial
When even the code snippets don't work as the book tells you they work, what good are they really?
Look, I'm happy it helped you, and maybe it's a difference between the editions, but the book has 50% 1 star reviews on Amazon. I'm far from alone with my opinion.
After an introductory Java textbook (e.g. Head First Java) you don't need Java for Dummies (I haven't read it though). The rest you could read in any order. Throw in Java Concurrency in Practice, Effective Java and something on Java 8 as well.
Personally? I'd start with Thinking in Java, then jump into one of the others. (Head First Design Patterns has been good for me so far, but I didn't really enjoy Head First Java, so try your other book).
The reasons I suggest Thinking In Java:
Since you already know loops and such, and have a foundation in some scripting language, TiJ is a good choice for understanding the "why?" of Java before the "how?" of it.
Try Head First Java. Gets a lot of praise and is a fun and easy way to get into Java.
Use whatever software you feel comfortable with, for getting started I'd recommend a nice text-editor like Sublime Text, or Atom (which is free).
Check out "Effective Java" by Josh Bloch (if I'm not mistaken).
Also check out the Algorithms course by Robert Sedgewick and Kevin Wayne on Coursera.
Another thing are Design Patterns. User Iluwatar has them nicely compiled on Github (can't link to any of the resources as I am currently on mobile).
Last: Java Multithreading by John Purcell on CaveOfProgramming.com
I am not sure if it fits perfectly. But I am currently reading/following Sedgeicks Algorithms, 4th ed. booksite - coursera
The course uses its own Java environment with an editor called DrJava, the environment helps you checking your style, find bugs etc.
The coursera course is not self paced, but as long as you can't live without teacher feedback, it is possible to follow the course in your own pace.
You need to clip the ImageView
holding the HealthBar image in your activity code based on the value of Health_Percent
. You can do this using the ClipDrawable
class, which is part of the native Android library. Here is a StackOverflow question that might help.
edit: For future reference, /r/learnandroid is probably a better place to ask Android-specific questions like this.
I'd say go for git as version control. You can host unlimited private repos on Bitbucket.
If I understand correctly: You're looking to make a 2D side-scroller. I'd start with the language named Processing. It's the Java syntax; just more visually based.
Plenty of tutorials here: https://processing.org/
This may be what you're looking for: https://youtu.be/Ouza_4SsbLc
Happy coding, this whole path will be research, trial and error, implementation and finally, success.
You will build your skyscraper, one brick at a time.
It's not a default implementation.
Set.of() will instantiate an object of SetN, which is a simplified implementation of HashSet.
Set.of(), List.of() etc. are considered convenience methods. See the following JEP if you want to learn more: http://openjdk.java.net/jeps/269
The Odin Project has a pretty good intro to git and GitHub, you can run through it in about 30 minutes.
The above link will walk you through setup and the next lesson will walk you though the basic commands.
The beauty of the question is that you can go in very much detail about it l(like this guy does here https://github.com/alex/what-happens-when/blob/master/README.rst), but for an internship(and even for a more senior role) I asume something like this should be enough: https://www.freecodecamp.org/news/what-happens-when-you-hit-url-in-your-browser/
This is a much nicer set up. I really like the look of the diagrams. A tool called Balsamiq was used to create the roadmap.
I found a similar tool called Pencil Project to create charts/roadmaps.
Edit: fixed link.
H2 is the most commonly used in-process database in the Java ecosystem. It's pure Java (so no native libraries), very feature complete, can emulate other databases like Postgres. It can keep data in memory (so it's gone when the program exists, used when testing) and on disk.
The site I linked has examples. You'd still use JDBC too, so you could use the same code (mostly) if you'd ever move to a different database.
The classpath is where the Java runtime looks for referenced classes.
If you're using Maven you really should just let it handle running the tests.
There is http://codingbat.com dedicated specifically to Java (and also Python).
If you rather search for general exercise, perhaps my http://www.codeabbey.com may suit you. After solving each exercise you can browse other's codes to learn from them. This usually is almost as good as if those people teach you personally... :)
To start with most people call it 'Core Java'. I have read Programming with Java by Balaguruswamy which i can vouch for. It is a really good place to start with even if you dont have much knowledge on programming. It covers most of the fundamental concepts in Java and explanation is pretty laymen.
For coding experience, you can start with Hackerrank course. I have done this course in the past and it has basic exercises on all the funcationlities concepts that are used in day to day coding.
Learning Java and studying Algo&DS are different things. I would advice get a good grip on the Java language first before jumping into Algos. You will get some basic exposure to Datastructures while learning any language which will come in handy while implementing Algos.
Please, provide your complete method how you read the files. Without that information and without any error messages you receive it's basically impossible to give you solid advice.
Maybe upload the code to gist, or pastebin to make it easier than reddit formatting (one empty line above the code block, each line indented by 4 spaces).
Please, post your current code on Pastebin (single class/file only) or on Github Gist (multiple classes/files) with proper file names (including the .java extension) and Java formatting switched on.
Without code it trying to help you is left to blind guessing which is not productive at all.
I would recommend to use postgres as a database-engine:
And have a look here for working with Java und Postgres:
http://zetcode.com/db/postgresqljavatutorial/
Cheers!
Is this going to be your first programming language/experience entirely? Regardless, for Java I recommend learning/doing a single thing at a time. No single thing in programming is that difficult, but all together it washes people out in no time.
The stress of setting up your local environment variables, IDE, classpaths, project management tools (Maven/Gradle) PLUS the actual difficulties associated with programming and making sure it all plays nice is just a real killer in the beginning.
So, do your best not to get distracted by all the fancy tools and libraries and IDEs, they'll bog you down from the actual satisfying parts of programming and you'll burn out so fast.
A good foundation would be using the community version of Idea's Intellij IDE, Java (most recent JDK), and creating a basic Application/Console project in Intellij. Once it's set up, you're free to do whatever you want. You can make a basic command-line calculator program that is as simple or complex as you like. It can use OOP or just primitives and methods, whatever you like.
If you ever feel kind of lost on what to do, look a little bit into the computer science side of it. Really cool concepts are like how memory management works, what does a processor actually do? How do multiple programs run at seemingly the exact same time but there's only one processor and one core? Why can two very similar looking algorithms perform at drastically different speeds? Those fancy questions are tangential to actual coding in the industry, but they keep the enthusiasm going and build yourself a foundation that makes you feel like "damn, computers are my specialty". Anyway, rant over and good luck!
No, Community Edition is licensed under the Apache License, Version 2.0 as claimed at the bottom of the edition comparison matrix. You can develop paid commercial software with Community Edition, and there's no restriction from making commercial videos or tutorials using it. (I think "Section 2. Grant of Copyright License" spells this out with it's mentions of "publicly display, publicly perform" but IANAL.)
That would have to be System.out.println
, not system.out...
, and it would also have to be put into a method, it doesn't work on class level.
But Eclipse is totally broken for me, too, even when it works, that's why I use the Community Edition of IntelliJ IDEA. Once you've gotten used to it, you won't look back. Promised.
There is an app called Dcoder you can use it to code in almost any language, save code, clone git repos, develop big projects and even web development. I am sure it'd be helpful to you
I’m surprised I didn’t see this already. But this is usually the go to for beginners since it covers most and explains it well and on a low level which is great for understanding. It’s called head first design patterns. https://www.amazon.de/First-Design-Patterns-Brain-Friendly/dp/0596007124
Cracking The ~~Technical~~Coding Interview is a great book to check out.
It walks through a bunch of different datastructures and different approaches to solving algorithms. It also has a few chapters about how the large tech companies interview, but the core of the chapters are about ds and algo's. They also have really detailed answers to each question.
https://smile.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/0984782850/
Edit: fixed the book name and added link
If you want to learn good core Java skills then you would struggle to find a course that is recommended more than the Helsinki mooc.
If you already know the basics and want to learn about best practices in Java (and the concepts can apply to other OOP languages) then Effective Java by Joshua Bloch is the gold standard. The 2nd edition is old but still relevant and the 3rd is coming out soon.
Although not a reference, but an excellent supplement to read through once you've pick up some familiarity with Java is "Effective Java" by Joshua Bloch. An updated 3rd edition is just being released.
If you are brand new to Java and OOP I recommend Head First Java. Wish I had discovered it a year ago. They use a lot of "silly" examples but wrap them with visual cues that really do help. It also basically answers all the questions I had ever had when I was first starting like "What is a class? What is an object? An instance? What?" Yeah it will help you. I don't think any professor would make it required reading because it isn't exactly "academic" but IMO it should be.
Such breaks are great for learning important things that are not directly related to active programming.
Read "Clean Code" by "Uncle Bob" Robert C. Martin in your spare time.
<em>Think Java</em> by Allen B. Downey is another great read.
Besides the above, devising and planning the exercises away from the computer (and without internet) is also a great learning experience. Instead of going to the computer to solve the exercise, do it by hand, on paper without the computer. Analyse the exercise, play it through as if you were the computer, find an algorithm, and then write a program or pseudocode for it.
This is the old-fashioned way that we old geezers learnt to program when computers were rarely available and if they were available they were seriously time-constrained so that all the time we had was to hack in the program and test it once. If errors appeared, we debugged them offline and waited for our next slot.
Limiting your available resources is a great way to learn to plan and think ahead. The positive side effect is that your overall code quality will improve and your analytic thinking and problem solving abilities will get a boost.
That is from Quora.
Sumit Kawatra, Oracle Certified Java Professional SE 6 Answered Jul 24, 2016
I am self taught Java Developer. i can tell you the path as i learn all these through books and coding at my personal laptop.
Step 1: Core Java Fundamentals and Understanding of OOConcepts and Exception handling and some Internals of Java.
Step 2: Learn JDBC.
Step 2 : Learn JSP/Servlet/HTML/JavaScript and build CRUD Web App with MVC Pattern and (JDBC++ connection pooling). try to apply your full Object Oriented Principle knowledge on this App.
Step 3: Learn Hibernate and wrote persistent (dao layer) logic with Hibernate in the same app.
Step 4: Just read about Spring and study why we need this…. IOC/Decoupling/Cross Cutting Concerns/Pooling/Exceptions/Template.
Step 4.1 : Just Think the difference if same app you build with Spring and what benefits you can have. Did Existing app some problem because you did not used Spring concept like IOC/Template/Support Classes etc..
Step 5: Start writing a new App with Spring MVC/Hibernate. Build That test that.
Step 6: Learn JEE concept like WebService / Messaging / Transactions /Cache and try to implement with Spring and without Spring.
Congratulations You are JavaEE Developer.
Links to Study :
Core Java : Head First Java/ SCJP Sierra Book/ Effective Java. JSP/Servlet / Hibernate / Spring — This Youtube Channel is enough Java Brains
Thanks For Reading.
Happy Learning!
I found Head First Java to be a good resource for actually helping you learn rather than memorize. It's not for everyone as it contains a lot of goofy text and images (which they say helps things stick). It was the first Java book I read and It helped me with the basics. That being said, the free resources in the side bar are also a great option. I can personally attest to the MOOC course. The ability to test and submit your code in an IDE is super helpful. Anyway best of luck, programming isn't something you pick up in 5 days. People who have been programming for years still have plently they can learn to improve.
imho,
1) go through both courses on mooc.fi
2) read/work through Thinking in Java
-- You should "know" Java pretty well at this point
if you want another resource/a large number of exercises and are willing to spend the money get this book
https://www.amazon.com/Intro-Java-Programming-Comprehensive-Version/dp/0133761312
From here you can move on to more intermediate/advanced books like:
Java Concurrency in Practice
Design Patterns: Elements of Reusable...
At this point you should be good.
As promised I would look at your code :)
First and foremost: You can abstract this as much as you want. There really is no point in making something super modular if you know this is the end situation. Normally you would apply a good modular structure because you know you (and probably others) will be developing on the project for a long long time, and you will be improving/changing this structure constantly.
1) You only have 1 class, you can create classes for pretty much everything; Dealer, Card, Deck, Player, Game and probably many more, depending on your needs.
2) The 'rule' is to let 1 class do 1 thing. So i.e:
a. Card class holds the value of 1 card compared to other cards
b. Deck is a collection of certain specific cards
c. A dealer deals cards from a deck (or more decks?)
3) Keep methods short, think of what you want to have available to someone that doesn't know your classes, and make it easy for them to understand. i.e.:
a. All your methods are public
b. A round has a clear start and end situation: place bets -> deal -> loop players hit/stay -> decide winner -> payout. these could all be seperate methods or refer to methods of other classes.
Its quite hard to sum up everything since to fully abstract it you can increase the amount of work your project takes 100fold. In the end its all about separation, you want your code to be readable.
My best advice is to read the book 'Clean Code'.
I know that there is an Effective Java 3rd edition coming out in October. Unfortunately that is all I really know if you want to read anything past java 1.5
Honestly, the 2nd edition is very good, and if you know the basics of OOP and Java syntax, then this book can be good at teaching good practice.
I personally felt Head First Java really picked up pace and became helpful once it got into the Battleship exercise with ArrayLists, Polymorphism, and Encapsulation.
Alongside the book, I made my own examples of Getters/Setters, ArrayLists, Polymorphism, and Encapsulation. Once I got to that point, I was able to take off running with Java
> Quick note is that in the book we do not extend the Frame class.
And that's the whole point.
Since in your code, you have extended Frame, you have access to the methods without referring to a class. In the extended class you can work in the same way as when you write your own custom class; i.e. you can call methods of the class (and the inherited methods from the parent).
The "Head First Java" book does not extend Frame and thus needs the object on which the method should be applied.
Thinking in Java is still a great book if you can handle its dry style and tendency to go into ridiculous depth on certain concepts (way more than you would expect from a beginner course).
The issue you are experiencing is not due to the Java version etc.
The book is asking you to create class variables without initialising. E.g. public class Test{ int a; public static void main(String[] args){ System.out.println(a); //this works int b; System.out.println(b); //this doesn't work } }
Class variables get initialised automatically but method variables don't so the compiler will throw an error.
Some of the most highly regarded books I've come across are,
Head first Java
Effective Java
Can also try the helinksi course if you want more beginner friendly, I know you said you wanted to possibly relearn concepts.
Apologies for shitty formating, my phone can be a derp at times.
Yup an excellent book, pretty much a standard manual on Java. I think the first edition is actually available online for free here (Not sure why its on a travel agency website) and also Java Concurrency in Practice when you are done reading Effective Java which is also available for free here [1st Edition]. Both books were a lot more helpful and better than a lot of my college textbooks.
I would recommend using numerous learning resources. I noticed I pick things up in different ways, through different mediums. As someone mentioned already, John Purcells's Cave of Programming course, which I believe is still free, is great. I would try to do a few modules a day. I would supplement that with a solid book. Some may laugh, but Head First Java was a great resource for me. As someone who never programmed anything other than HTML before, it did a great job of putting all the abstract concepts into an easily understandable format. There is also a introductory Java MOOC from Stanford Uni on youtube which is great. https://youtu.be/KkMDCCdjyW8
I would also recommend checking out some podcasts while you're doing mundane tasks or at the gym. They provide another way to completely immerse yourself in this world. Lastly, some may disagree, but I found it helpful to mess around with other languages as well. I learned to use PHP as well, during the same time. I believe doing so allows one to wrap their head around the science behind what you are doing. Which will help in the long run.
Good luck
If you've finished Head First Java in its entirety, then the next logical progression is to learn some higher level concepts that will improve your code and make it cleaner, more readable, and more maintainable. I can't vouch for how strong of a book Head First Design Patterns is, but I recommend one of the authoritative sources on the topic: "Design Patterns", by the Gang of Four.
And, you already know this, but I'm going to say it anyways: Reading more books isn't going to do shit for you unless you have the practical experience to pair up with it, too. A lot of the higher order topics like design patterns, topics in software engineering, and process won't really click for you unless you've truly experienced the woes that motivated people to invent such topics to begin with. Don't fix a problem that you don't have yet.
I may get laughed out of here, but I've had success with two books. Head First Java, and Oracle's Java; a Beginner's Guide. They complement each other very well.
While going through those two books, I've also gone through codeacademy's intro course and have dabbled with John Purcell's intro to Java course on Udemy and caveofprogramming.com
I wish you the best
Highly recommend Head First Design Patterns
Although, it may take you longer than a week to complete.
In my opinion Thinking in Java is sometimes too dense for a beginner, especially when OP is looking for an easy book to read. I'm still a beginner myself but I would suggest to start with Head First Java and do exercises from mooc.fi/english. Head First Java is an easy and good book to read as a beginner but it lacks good exercises (That's why I'm suggesting to accompany it with the mooc.fi java course).
This way you'll be able to create simple programs in a short amount of time and you'll also be able to move on to Effective Java book faster.
Nonetheless, Thinking in Java (3ed is free, 4ed you have to buy) is generally considered a decent starting book and you can't go wrong with either Thinking in Java or Head First Java.
Statics as state are a anti-pattern.
Use statics only as global constants, stateless utility functions, etc.
If you want to have a good threading model, you want immutability and every process managing it's own state. All state shared by multiple threads will be at risk of edge cases such as race conditions and other side effects.
You can use "synchronized" to help with thread safety, but it can also hugely impact performance, as well as cause other bugs such as deadlocks if you use them incorrectly.
I'd recommend reading a Java book, maybe Effective Java has a good chapter on multi-threading, and talks a lot about immutability and how to pursue it in java.
Effective Java, The Java Tutorial, Java Concurrency in Practice would be books worth referencing from my experience (I need to read more). C++ is different from Java, and you are better off just trying to learn Java starting from ground zero.
Also try to redo everything you did in that class where you used C++ in Java. Besides memory new/delete/pointer operations as long as it was object oriented it should transfer over and serve as a learning experience for the quirks of Java.
The two books I would recommend are Effective Java and Clean Code. These two were, by far, my favorite books when I began my first Jr. Developer position and I always suggest these to anybody that asks me.
I'm doing this right now, in week 10. There are a few parts where the english translation isn't perfect, but overall it is fantastic and has tons of great problems to apply what you are learning and reinforce concepts. I am doing this along with reading "Head First Java", which also does a great job of explaining concepts. Together they really make the concepts clear.
I am reading that book right now, good basic intro.
Personally I am doing that along with a really good free online course (google "mooc finland java" if you want to try it), where you can submit assignments and they are graded so you can practice your problem solving skills.
If you are looking for books only I've heard great things about "Thinking in Java", and for something more advanced "effective java".
For games for your hobby, I would check out libdgx, it is an open source game engine you can use to make games for desktop/android/websites all at once. Hope this helps!
If you are a visual learner, this book looks good
i) Big Java Early Objects by Cay S. Horstmann (z-lib.org)
1) "Java: The Complete Reference, Ninth Edition" by Herbert Schildt ( i have read through this and other newer editions)
2) "Introduction to Java Programming. Comprehensive Version. 10th Edition" by Y. Daniel Liang ( i looked at it, looks good, yet to read)
others
a) Absolute Java (Global Edition) by Walter Savitch, Kenrick Mock (z-lib.org)
b) Think Java How to Think Like a Computer Scientist by Allen B. Downey, Chris Mayfield (z-lib.org)
I took an android course, then tried to go to libgtx only to discover I was not as comfortable with Java as I thought, so took this one, and now back in the libgtx class feeling much more comfortable.
https://www.udacity.com/course/intro-to-java-programming--cs046
I recommend codingbat. Mooc is the best single source for pure java though. Once you feel you have a decent grasp on java (I would say knowing a decent amount of OOP as well as methods and what not) then jump into android. Stackoverflow is your friend. So is reddit, youtube, etc. This is a good place for absolute beginners in android. Then I would recommend going here. Think up a simple project you'd like to do and do it! Use the resources you have at your hand until you feel like you can do more. Than do it! It's all about self motivation, I'm learning. For example, I'm decently advanced in Java and in my free time I work on a GPA calculating android app with (hopefully) stellar design.
Good luck!
What exactly are you trying to do?
For elasticsearch they can be used with REST requests or API use in Java (would recommend using their API). Everything you need is in their docs, usually useful for seeing what type of queries work best for what you want : https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-match-query.html
I'd recommend you use the elastic search docker image to play around with it a little bit.
https://hub.docker.com/_/elasticsearch/
For elasticsearch its good to measure twice cut once when defining an ES schema. Think of what type of data you have, how it will be stored, and how it may be retrieved. Define a schema, and then use the applicable queries.
Hi, how are u ?
I am fresher not yet started working still looking for job.
But I will share you my experience,
Solving DSA problem is a very big topic it can't be covered so easily and as a freshers looking for job they(company or a interviewer) is not going to see how many algorithm you can solve, so don't wory about grasping everything all at once it will confuse u as well as demotivate you to learn coding.
As you you have said you got a little experience in c and python,
And learning java for 15 days.
First make sure that you have all java concepts are clear to you,
Mainly java OOPS(inheritance, Abstraction, Polymorphism, Encapsulation) make sure you have a clear idea about this topics.
Try this try solving all the questions this will cover you up all the java concepts plus while solving all this questions you will get an idea about how to solve problems.
Remember a interviewer will never see how many algorithms you can solve rather he/she will see how will you solve a given question and this comes only by practising.
Sorry for long post and be consistent
Good luck
Hi I don't know whether this would be helpfull to learn DSA from scratch or not but this is a good resource it consists a lot of questions plus their solutions and would be helpfull it u have a average knowledge about coding. Try HackerRank also you will find a lot of interesting question. HackerRank or leetcode both are good.
While I can't help you with Java EE courses, I can recommend two sources for learning Spring that have been recommended to me, as I also started learning it a couple of weeks ago. "Spring in action" is a very good book if you want to learn about Spring, it's not dry and it's full of examples, so it's easy to follow along and learn a lot. The other source is the tutorial on Tutorialspoint, it's not as broad as the book but it has its advantages. Link: http://www.tutorialspoint.com/spring/
Good luck!
To add on the book recommendation: Head First Design Pattern is a really nice one. Not covering that many patterns, but explains why and when to use them and it also uses Java (8) for the example implementations.
Not sure offhand of a good book for the lower-level reference-y stuff, other than the Java Language and VM specifications. This article might be useful: https://www.cubrid.org/blog/understanding-jvm-internals/
As for how ArrayList works internally, the only book I know of is 10 years old: Java Generics and Collections, though it certainly goes deep on things. I'm sure there are blog posts/articles that cover this, though you can also get a lot out of just reading the source code.
The next best thing would be learning how to use a REST api, like Spring IO. Furthermore, Project Euler is a fun way to keep your ability to solve logical problems, and your knowledge of Mathematics up to par.
Pure Java is not suitable for making games. You can "extend" it by using libraries (Something that is quite normal for Java, anyway.), which allowed to make Minecraft, Delver, and others - but pure Java can only be used for game prototypes, experiments, or games that look like they're from the 1990s. That said, I love to try to use Java to make games without additional libraries for some reason.
In case you haven't found any android resources, I really like this one so far.
https://www.udacity.com/course/ud853
It is through engineers at google and it assumes you know Java. They offer the videos and such for free, the paid course gets you coaching/code reviews/etc from google.
https://udemy.com/jsp-tutorial/
Chris Darby - if you look him up on Udemy has a lot of topics related to Java development, his JSP course (like 10 hours) talks about MVC and its a pretty good intro. his site luv2code.com might also have stuff if you use his search tool and see whats on his site. some things on his site seemed more detailed than what is in Udemy, if I'm not mistaken, but the structure of Udemy is nice.
there is a huge spring hibernate course of his on Udemy too.