Top products from r/javahelp

We found 55 product mentions on r/javahelp. We ranked the 61 resulting products by number of redditors who mentioned them. Here are the top 20.

Next page

Top comments that mention products on r/javahelp:

u/jbacon · 1 pointr/javahelp

Here's pretty much your most basic flow for problem 3:

  1. Find the square root of your target number.
  2. Starting at 2, check if target % loop counter == 0
  3. If yes, store as a factor and divide your current target by that number. Use that as the new for loop end condition. Find the complement of that factor, and store that as well.
  4. Go through all the divisors you found and test if they are prime.
  5. The largest remaining number should be your solution.

    To troubleshoot, use a debugger (Eclipse's builtin is nice). If you feel it's taking too long, break the program's execution and check its state. Is the loop counter about where it should be? Are the found divisors plausible? Is the loop end target plausible? Set a breakpoint on the first line inside the loop and keep stepping through (either one line at a time if you like, or just hit 'resume' and it will break again at the top of the next loop iteration).

    I learned Java throughout college, as it was the primary teaching language. Honestly, the best way to learn is just to WRITE CODE. Solve problems that you don't know how to solve. Invent random things that are useful to you. Your code doesn't have to be perfect when you're learning (and it definitely won't be!), and what is important is that you constantly look for ways to improve. I want you to look back on code you've written a year ago, and think that it's absolute crap - that will show that you are learning and improving.

    Somewhat counter-intuitively, the best resources are books! I'll list some recommendations below.

    Keep these principles in mind:

  6. Don't repeat yourself. If you're copying and pasting code, it is wrong. If there is not a single point of truth for each piece of information in your code, it is wrong. Find ways to keep your code clean and non-repetitive.

  7. Document everything. Comments - comments everywhere. Explain what ever piece of your code does. Explain what each method's arguments are, what it does, and what it returns. If you don't know, then that's a big red flag to reevaluate your design. If a bit of code is doing something complicated, write inline comments explaining what each bit does. All this is for future you - I can hardly remember code I wrote last week, let alone a year ago.

  8. Separation of concerns. Each piece of code should only work with what it is directly responsible for. UI code should deal with presentation. Application logic should deal with data manipulation. A persistence layer should handle any database or serialization of things. Keep your code loosely coupled!

  9. Design patterns. There are dozens of semi-formal patterns used to solve common problems in software. Learn to recognize these problems, when to apply these patterns, and how to modify them to suit your goals. See Wikipedia, or Design Patterns by the Gang of Four.

  10. Be pragmatic. What does your code really need to do? What is the minimum that it needs to accomplish, and how can you keep it extensible enough for future expansion? The answer to the last part is largely the previous points - well designed code is always easily changeable. The Pragmatic Programmer is another excellent book. It even comes with a handy summary sheet of its main points!

  11. TEST! Write lots of unit tests. Make sure that every piece of your program is tested to be correct. Every time you find a bug, write a test for it so it never happens again. If a piece is difficult to test, it may mean that it is poorly designed - reevaluate it. This is guaranteed to save your bacon at some point - you'll probably hate the work, but the safety net is invaluable. Being able to instantly tell if you program is working properly is invaluable when making changes.

    Once you start getting a feel for Java, which I think you might be already, Effective Java is the book. You probably won't need any other resource for Java itself.

    If you need help with something, Reddit is a great place, but Stack Overflow is the programmer's mecca. The best resource on the web for just about everything software, and their sister sites cover other topics, from IT/sysadmin to gaming.
u/get_username · 2 pointsr/javahelp

For the purposes here I will basically define my terms I am using.

...

Alone will mean that there could be other methods, variables, etc that I am not accounting for. Basically it is saying "Below or above this is a snapshot of an interesting area.. there would be other code too!".

While

myMethod(...);

or

public void myMethod(...) {...}

Is saying "I don't know what you'd put there. It depends on what you decide" In the case of:

(...)

We are talking about unknown parameters passed to a method.

In the case of:

{...}

I am talking about an "unknown method body". Meaning I don't know what the logic would be (or am too lazy to type it out).

==
==
So a problem will certainly occur in GameView. Perhaps I was misleading you with what to do though. You have this line of code (198) in GameView.java

myGameView = new GameView(getContext());

That is will cause an infinite loop. Which means I may have not been clear earlier on how to use GameView correctly (because this is clearly a line of code I suggested).

Each time the "new" keyword is used its going to create a new instance of GameView. It does that by calling this method

public GameView(...) {...}

But inside that method is this statement:

myGameView = new GameView(getContext());

Which is going to call this method

public GameView(...) {...}

You can see the loop now and where the problem is happening.

This is probably the cause of your stack overflow. It will keep creating GameViews until the end of the universe.

Lets talk about how to fix it and where you should be using the new keyword.

==
==

About fixing your program to run.

If we look inside your GameThread.java class we see this line of code in the run() method.

GameView.myGameView.onUpdate();

You're trying to reference GameView as static still. This wasn't what I was trying to initially get at. Instead you should create a variable in the GameThread that stores the GameView as a new object and access that directly.

public class GameThread<MainGamePanel> extends Thread {
...
private GameView myGameView;

public GameThread(...) {
...
Context context = someMethodToGetContext();
this.myGameView = new GameView();
...
}

then in your run method you can call that object directly without static references etc.

public void run() {
...
// somewhere in the appropriate spot
myGameView.onUpdate();
...
}

This means you could remove all the static from all your fields and methods in GameView and instead use it as an object.

==
==

This part is simply about writing slightly better code :)

Also one more thing that would make your code easier to read and understand. I try to abide by uncle Bob's standards.

You should place your constructor as the first method in the class:

public class GameView extends... {
// class fields here

public GameView(..) {...}

// All other methods here.

You shouldn't include unnecessary comments like:

// Global Variables
// -------------------

Because we already know what they are. It is convention to put them at the top of a class.

Furthermore anytime you feel the need to do that inside of a method like:

// Draw Stars
// ---------------

This shouldn't be done. Instead you should create another "Helper" method that does that, named exactly what the comment would be named. This will help with readability and it will become easier to maintain since each function will do one specific thing.

protected void onDraw(Canvas canvas) {
drawStars();
drawAnyBullets();
}

is alot more clear and easy to read. Generally There is a rule. That is if you have more than 1 or 2 levels of indentation inside a method you are probably having it do more than one thing and should break it up into smaller methods (that will be easier to read, and more abstract thus easier to write).

Then we want our methods in our class to go from "most abstract" to "least abstract" in our class structure:

public class GameView extends... {
// class fields here

public GameView(..) {...}

public void onDraw(Canvas canvas) {
drawStars(...);
drawAnyBullets(...);
}

public void drawAnyBullets(...) {
drawPlayerBullets(...);
drawEnemyBullets(...);
}

public void onUpdate() {
if(touched) {
update();
}
}

public void update() {
renderBullets();
renderStars();
renderEnemies();
keepShipInBoundaries();
}

...

// Other methods past here include some logic, but still not full logic

public void drawPlayerBullets(...) {
ArrayList projectiles = PlayerShip.getProjectiles();
for (int i = 0; i < projectiles.size(); i++) {

LaserShot p = (LaserShot) projectiles.get(i);
Color color = Color.CYAN;
drawProjectile(p, color);

}
}

....

// Other methods past here include all logic, no other method calls for this class.


public void drawProjectile(LaserShot projectile, Color color) {
paint.setColor(color);

int coordStartX = projectile.getX();
int coordStartY = projectile.getY();
int coordEndX = coordStartY + laserlength;
int coordEndY = coordStartX + laserwidth;

canvas.drawRect(coordStartX, coordStartY, coordEndX, coordEndY);
}

...
}

From here in one fell swoop we eliminated a lot of redundancy. Now whenever you want to place a projectile you simply call the abstracted "drawProjectile" method. Never again worrying about the minute detail.

Want to change how a projectile draws? Don't have to change every line of code. Simply change drawProjectile.

The more you break up your code into logical chunks the more often you'll find yourself able to replace certain lines of code with previously written logic. The easier your life will become.

You'll have to decide where to place the methods. What the best break up of functionality is. What parameters to pass into the methods themselves, etc. But that is all part of learning to code.


This might have looked complicated but I think you have it in you.

In fact your comments show me is that you know how to break your methods apart in logical chunks. This is good and is probably better than most beginning programmers. Now take it to the next level and break out those logical chunks into their own methods!

u/javaxnerd · 2 pointsr/javahelp

> Effective Java - This has historically been an excellent reference for Java. It's not entirely beginner friendly, but if you have at least a working knowledge of Java it's an excellent book to have around. Note: The link is for the 3rd edition which is coming out soon, I assume it will be as good as the previous editions, but in any case the information from the previous editions is still worthwhile even if there are newer features in Java 7/8/9 which is covered by the 3rd edition

I agree with this. Since 3rd edition is only a month away now after years of not knowing if/when there would be another edition, I'd probably say pre-order it and hold out for 3rd. But yes, 2nd has been a great help to me.

u/GlitteringSkeleton · 4 pointsr/javahelp

I'd start with this article. Finding newer versions of the books mentioned here is going to get you going on the right path. Here's a few I've picked out that I've personally read over the years.

Java: A Beginners Guide - Doesn't really get much better than this as far as an introduction into Java. Clean examples, pretty easy to follow. Would be a great place to start

Effective Java - This has historically been an excellent reference for Java. It's not entirely beginner friendly, but if you have at least a working knowledge of Java it's an excellent book to have around. Note: The link is for the 3rd edition which is coming out soon, I assume it will be as good as the previous editions, but in any case the information from the previous editions is still worthwhile even if there are newer features in Java 7/8/9 which is covered by the 3rd edition

Java Concurrency in Practice - As you become more advanced this book can help guide you along the ways of concurrent operations in Java and pitfalls/issues you'll run into (and how to avoid them)

u/kraftvgs · 5 pointsr/javahelp

For the love of god find someone else that teaches Java at a high school level. Go over their lesson plans with them. Figure out what types of things they are teaching through each unit. While reading Head First is a good introduction to programming Java, it isn't necessarily what you need to be teaching these kids at this point.

Is this a first programming class for most? Or is this a follow-up to an introductory class? There are a lot of variables that will influence the content and concepts that should be taught.

Finally, and please don't take offense to to this, but I find it crazy that they are having someone with NO experience in the position of introducing people to a field that can be simultaneously fun, frustrating, rewarding, difficult, etc. Again, please don't take offense, but you will not do a good job grading as you have no experience. You need time to practice identifying good and bad code yourself. For every problem out there you can probably devise hundreds of ways to successfully solve it, but only some of them will be elegant and (hopefully in a teacher's eyes) acceptable.

For the love of god take a programming class! Have someone look at code you are writing because there is no better way to learn than to do it yourself. Head Start is a decent point to learn Java. Also check out Clean Code as it will help you learn some fundamentals of what makes good code. Finally, get together with another teacher that has experience teaching this subject matter and leech as much as you can off of them. Software programming can be a fun and very lucrative career. I understand you are lazy but please don't sour kids on it or start them off on the wrong foot.

u/slowfly1st · 6 pointsr/javahelp

Since it's only a few weeks and you will use Java primarily, probably look primarily at the Java API's / components:

https://docs.oracle.com/javase/8/docs/index.html

(honestly can't find this overview page for newer versions java)

Collections-API is a good start (Map, List, Collection and so on and their implementations), I/O (read and write files), Concurrency/Multithreading (also understand the concepts), JDBC (connect to a database, read and write data). Date/Time-API. Probably networking.

Also learn all the language features. E.g. that there are three different kind of comments, know "all the keywords" (what's volatile and transient? I always mix them up ...), or what is try-with-resource?

If you're decent with java, you'll have,... let's say "one problem less"

​

Learn OOP/OOD: Read and understand those concepts is a good start: SOLID, Loose coupling, High cohesion, Information Hiding. Those concepts we do apply, so we can reuse parts of our code (so it's not duplicated), improve maintainability, interchangeability (like changing the front end technology to display the website without redoing the whole software), and so on. Not sure if that's too early for you, in the sense, that you are still learning the language and learning another "thing" is too much.

​

Databases are already mentioned (many applications use a relational database as 'backend'): Setup a database (e.g. postgreSQL or mysql, both are free), learn how to create tables (columns, datatypes, primary keys, [indices, constraints]), crud operations (create, read, update, delete data), how to restrict selection of data (where clause), how "to join tables", functions (max(), avg(), count()). Imo the basic concepts of 'relational databases' and how you get/change data is quite easy compared to learning a programming language.

​

Read Clean Code. (Probably too early for you, but I leave it here)

​

Probably have a look at HTML/CSS/JS. I really like w3schools, but mostly as a reference, because I don't know these by heart. Not sure if you have enough time, but try to learn some of the components of html and learn how to style them. It's actually quite easy compared to Java. If there's enough time, to learn some JavaScript may be helpful, too.

​

... and now combine everything :P - no, seriously: "Ship" a product - even if it's something small and irrelevant. To break down a problem into smaller problems and combine everything we know to solve those problems with the most elegant solution is what we do day in day out. And get your code reviews (e.g. here on reddit, the stackexchange-network has a good code review network, too). Because there's always a better and more elegant solution. If no one tells you, your code sucks (... or can be improved) and why, you keep writing bad code - or at least you won't improve as fast.

u/Plussh · 1 pointr/javahelp

You should use classes to house methods based on relevancy and to generally make your program easier to understand.

I would say having 20 methods in your main class probably isnt best practice, but it really depends on what the functions are being used for.

Say if you were writing a program pertaining to cars, you would ideally have your main class launch the program and create instances of classes, and you could have a class called 'car' that handles all of the functions relating to the use of the car e.g openDoor(), doUpSeatBelt(). It wouldnt make sense to have these in your main class.

Classes are there to make your program easier for both you, and arguably more importantly other people to read, they also make it easier to re-use code and scale your programs.

There are tons of resources out there that explain this better than I can, see 'Java: the complete reference'.

https://www.amazon.co.uk/Java-Complete-Reference-Herbert-Schildt/dp/0071808558/ref=sr_1_10?ie=UTF8&qid=1518696204&sr=8-10&keywords=java

u/banuday17 · 1 pointr/javahelp

To sharpen your OOP skills, I highly recommend these two books. I would go so far as to say they changed my life:

u/Idoiocracy · 2 pointsr/javahelp

Java is an excellent choice of language to learn if making an Android app is your eventual goal. While Kotlin is also available, your desire of wanting to learn a language in the context of physics simulation makes you a perfect audience for a highly recommended book called Computer Science: An Interdisciplinary Approach by Robert Sedgewick. This book is excellent because of the interesting problems and wide breadth of science and math topics that it touches upon while teaching the Java language.

The upside to going through this book is you will have an excellent foundation of Java and computer science, fully prepared to learn Android programming. The downside is that this will take longer than a tutorial approach, and the book costs money. Here is a sample chapter 2 in PDF format.

Please note that Robert Sedgewick has another book called Introduction to Programming in Java. The difference between this book and the Computer Science book is that the Computer Science book has the entire contents of the Intro Java book, but also has three additional chapters on computing theory, computing machines, and processor design. Since the two books cost about the same price, you might as well get the larger Computer Science book with additional content.

If you prefer video lectures or an online course, they are available for this textbook:

Video lectures

Coursera's Computer Science: Programming with a Purpose

Coursera's Computer Science: Algorithms, Theory, and Machines - This course covers the second half of the Computer Science book.

u/morhp · 8 pointsr/javahelp

>Imagine you need high powered antennas, tons of bit shifting, very specific algorithms and so on. It’s a very complex topic.

That's not really the problem. The problem is more that you need access to the mobile phone network, so you either need to register as your own provider or you need some contract with an existing provider. After that, sending an SMS won't be that difficult, probably just need internet access to some gateway server.

Or you just pretend you're a normal client and use an android device (or even better a USB-Modem for a PC) and use that to send an SMS. That's probably the easiest solution but you need to make sure the software/driver has an interface that you can access easily with Java. Probably want to use a Linux PC and a compatible modem as that will be way easier.

u/siphilis · 3 pointsr/javahelp

It sounds like you could really benefit from reading Clean Code. It isn't really about a specific design pattern, but an overall design philosophy. It gets mentioned in the programming subreddits all the time, and for good reason. I haven't finished it yet, but it's already had a big positive impact on the way I think about, and design my code.

u/L_Caret_Two · 1 pointr/javahelp

I'll definitely give that book a look. The reason I'm using this book is because it's the book for the class I'm taking. This is the book.

Thanks again for the extensive replies to this post. I really appreciate your help.

u/Sk0_756 · 2 pointsr/javahelp

Read /u/RankWeis's write-up for what a framework is, he gave a very good explanation.

I would personally suggest advancing by learning basic / common design patterns. Spring is a dependency injection framework at its core, and dependency injection is a design pattern you should know well before picking up Spring to really understand and use its full potential. It's one thing to pick up and use a framework, quite another to know why you're using that framework and what problems it's there to solve. I would also argue that design patterns are something you can take on any project, not limited by the chosen framework, so you would get more mileage out of knowing those before jumping into a specific framework.

I would highly recommend the Head First Design Patterns book. It's very well written and makes the common patterns very easy to digest. http://www.amazon.com/First-Design-Patterns-Elisabeth-Freeman/dp/0596007124

u/Vorzard · 1 pointr/javahelp

They should be considered only as pure functions and even then giving up polymorphism can lead to software components that cannot be easily changed and interchanged.

Static factory methods are useful and should be considered instead of constructors. You can learn more about that from Effective Java.

Otherwise static methods are unnatural in an object-oriented environment and they can considerably hinder testability.
Kotlin (a JVM language that aims to be a better Java) for example does not have static methods and variables for this reason, instead it has class objects. Instances of a class delegate to a shared, singleton object and the caller can invoke methods of that class object on any instance of the class as if they were static methods.

u/papichulo916 · 2 pointsr/javahelp

Building Java Programs: A back to basics approach is the one I'm using right now for my class. It is expensive ( you can get it for around $55 on amazon) but I find it easy to read and therefore easy to learn the stuff.

u/Yogi_DMT · 2 pointsr/javahelp

https://www.amazon.com/Java-Complete-Reference-Herbert-Schildt/dp/0071808558

The official reference was definitely the best resource for me. Even if you're a beginner, if you really want to learn Java it's the most well written and best explained book. If you want to learn how to print hello world to the console there are probably some books that could get you there quicker but if you want to understand the language and not have to relearn poorly explained concepts this is the one.

u/tzjmetron · 1 pointr/javahelp

To get a better answer, you probably need to provide a bit more of your background. For instance, if you come from a C background vs C++ background vs beginner to programming, the level of explanation will vary accordingly!

Also, if you want to know all about Generics as implemented in Java, the best resource I can recommend is this - https://www.amazon.com/Java-Generics-Collections-Development-Process/dp/0596527756/

Philip Wadler (of Haskell and Monads fame) is one of the authors of Generics in Java. The book is rather old, but it covers almost everything about Java Generics and also how the Collections framework uses this feature. Superlative book, but it moves quickly from basics to advanced stuff, so caveat emptor.

u/Loomax · 1 pointr/javahelp

There is going to be a lot of "Head First Java" recommendations and I suppose it is a decent entry if you are of a visual learning type (personally I can't get along with it).
Even tho you did say books, https://www.edx.org/ is there to learn if you want to.

My suggestion would be to start developing your own application (can be the most simple thing) and expand on it and use resources like stackoverflow and if you got a little bit of experience I really recommend reading Effective Java by Joshua Bloch.

That is (from those books I have read) the book that has gotten me the furthers in understanding what to look out for. Beside that I suggest to find some people that enjoy the same and talk about coding and share experience (this one is most likely the most important point, since you learn so much from others and them pointing out your wrong-doings).

In a list this would be:

  • Learn the basics of java (you say you got that)
  • Create your own project
  • code code code
  • talk to others about your code
  • redo (it's wrong anyway)
  • read up on how to improve on the design
  • read Effective Java
  • Keep on doing it
  • Last but really important: Keep notes of what wrong and why!
u/katyne · 1 pointr/javahelp

> I need to get a book or something

Head First Java - everything you needed to understand about Java's OOP concepts, explained like you're 5 :] literally.

Hint - there are older editions available online.. much cheaper, it really doesn't matter, you might as well get the oldest one because the things in this book are conceptual and are not changing with new versions of the language.

u/OffbeatDrizzle · 2 pointsr/javahelp

Yeah, or if not just play around on your own with it for a weekend, it's pretty simple to pick up.

Something else I'd add to that list is dependency injection (which again might be covered under MVC-frameworks if they tell you about Spring).

Also, this is a useful tool for getting to grips with design patterns, and I can't recommend this book enough

u/Agoniscool · 1 pointr/javahelp

While not a walkthrough of the JVM, key sections of this book give a pretty good insight on what you need to know: Java Performace: The Definitive Guide

u/Tiltyard · 0 pointsr/javahelp

Spring in Action is a pretty good book imo. New edition covers Spring 4.

u/Razzal · 6 pointsr/javahelp

For a good beginner book that I think explains things well, look at Headfirst Java.

http://www.amazon.com/Head-First-Java-2nd-Edition/dp/0596009208

u/TheEffortless · 1 pointr/javahelp

You're welcome!
Here's the amazon preview link

u/lost_in_trepidation · 3 pointsr/javahelp

I really like Intro to Java Programming, Comprehensive edition. link

It has tons of exercises and it covers lots of Java 8 features and JavaFx (the modern gui library for Java).

u/sh0rug0ru · 1 pointr/javahelp

Oh, I think I may have misunderstood the question.

On the question of whether or not you should create a method that is called from the constructor which does the actual construction of the GUI, in that case I would advocate the "Clean Code" principles.

The constructor for a GUI is probably going to be doing a bunch of different kinds of things: layout, event handling, model configuration, etc. I like the idea of having small and tight methods, that are responsible for one of each of these areas of responsibility, which are called one by one from the constructor.

For this, I'm a very big fan of the "extract method" refactoring.

u/hadihaha · 1 pointr/javahelp

My experience with Java textbooks is the sum total of two, but i did like Head First into Java.

u/sunlollyking · 2 pointsr/javahelp

Joshua Bloch's essential Java is pretty widely available http://www.amazon.co.uk/Effective-Java-Edition-Joshua-Bloch/dp/0321356683

Its still considered the go to book when talking about concurrency and multithreading, i read it in University and found it a bit heavy going but it is highly insightful and Bloch is very knowledgeable on the subject.

u/Yithar · 1 pointr/javahelp

https://www.amazon.com/Functional-Programming-Java-Harnessing-Expressions/dp/1937785467
https://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

First book deals with Functional Programming in Java, which is another way of doing things compared to the Object-Oriented Paradigm.

Second book deals with Concurrency, which is a really important topic imo.

u/ryosen · 2 pointsr/javahelp

Java is a great language to start out with and I would recommend two books to get you running. Since you are new to the language and programming in general, start with Head First Java. Then, move on to a more advanced treatment like Core Java. Thinking in Java is also very good but it's dense and some people have a difficult time digesting it.

Once you have the basics of the language down, learn about working with databases. Then, move on to server-side development as that's where the jobs are.

Despite the similarity of their names, Java and JavaScript are not similar and cannot be used interchangeably. JavaScript is primarily used in UI development in web browsers, although server-side implementations have existed for almost as long as JavaScript itself. Currently, the most fashionable of these implementations is node.js.

Lastly, since you are looking to work professionally but without any formal education, know that you are going to have a difficult time getting work for the first several years. You might find that learning JavaScript (and HTML and CSS) are a quicker route to finding a job as front-end web developers often do not require a college degree, whereas Java programming jobs invariably do.

u/oorza · 2 pointsr/javahelp

Read, in this order:

  1. Thinking In Java.

  2. Effective Java

  3. Java Concurrency in Practice

    Those three books should get you wherever you need to be, without getting more specific books (e.g. framework books).
u/ewiethoff · 1 pointr/javahelp

Effective Java by Josh Bloch will eliminate bad habits.

Also, have you done some of Oracle's tutorials? Once you get through "Trails Covering the Basics" (which will be a lot of review for you anyway), you can pick and choose which tutorials interest you.

u/JavaAndMIPS · 3 pointsr/javahelp

Make a personal project. I made a game editor.



Read more books.

Java Swing:

https://www.amazon.com/Java-Swing-Second-James-Elliott/dp/0596004087

Java I/O:

https://www.amazon.com/dp/0596527500/

Java Generics and Collections:

https://www.amazon.com/Java-Generics-Collections-Development-Process/dp/0596527756/

Java Concurrency:

https://www.amazon.com/Java-Threads-Understanding-Concurrent-Programming/dp/0596007825/

Java Network Programming:

https://www.amazon.com/Network-Programming-Elliotte-Rusty-Harold/dp/1449357679/

Java Web Services:

https://www.amazon.com/dp/1449365116/

Java Database Programming:

https://www.amazon.com/dp/1565926161/

Java Performance:

https://www.amazon.com/dp/1449358454/

Intro to Design Patterns w/ Java:

https://www.amazon.com/Head-First-Design-Patterns-Brain-Friendly-ebook/dp/B00AA36RZY/

Design Patterns (not Java and very dry, but much more in depth):

https://en.wikipedia.org/wiki/Design_Patterns

If you read every O'Reilly book on Java and do two or three big projects (or ten small ones) with what you learn in each book, you will learn how to do anything with Java. Java can do anything any other language can, but it takes longer to get there. Once you get there - once you build it - it will run forever, provided it's built well.



Online resources.

http://www.tutorialspoint.com/swing/

https://www.javatpoint.com/java-swing

The javax.swing class:

https://docs.oracle.com/javase/7/docs/api/javax/swing/package-summary.html

The Java API specification:

https://docs.oracle.com/javase/7/docs/api/

Never took one of these, defer to someone else's advice:

https://www.udemy.com/java-swing-complete/

It takes a while to figure out how to effectively use google. Look up my posting history to see how to format posts. You may need to make a test class to simplify things or provide a simple (and obviously safe) thing that people can execute and debug, if they decide to help you.

You will spend a lot of time on the Java API spec, so make sure that you know how to read a method header and signature. You'll get used to it after a few weeks.

*

General advice.**

Debugging is the single most important thing you do. If you can't see what's going wrong, you won't fix it except via trial and error (which is frustrating and takes forever). Any time something goes wrong, either walk through it with a debugger or get print statements working. Getting print statements working is often a job in itself.

I spend more time debugging than I do programming, because when things are going right it's a breeze but when they aren't it takes ages.

Take up some other hobby that keeps you active.

When you're frustrated and nothing is working, do something else. Go for a walk, garden for a bit, cook something. Make sure you have a notepad or note-taking program on your phone so you can stop and take notes when the solution comes to you.

If nothing else is working, just screw around with things and make print statements to see what they do. That's how I learned everything.

Try to break everything.

Don't be afraid of embarassing yourself.