Learn how memory works in Java. This hands-on course explores fundamental concepts that can help you optimize your code, as well as quickly find and fix any memory errors that still occur.
- Hello, and welcome to this Java Memory Management training course. My name is Matt Greenctoft and I'm going to be your trainer on this course. I've been programming for about the last 20 years and I've been teaching Java Professionals for about the last 5 years. On this course we're covering a topic which I think is really important for all good Java professionals to understand, and that is how memory works in Java. It's important, because with this knowledge you'll make sure you never write any code which could crash with an out of memory error, and if that does happen, well by the end of this course you'll know how to find the source of the problem and fix it.
It's going to be a very hands on course, there's going to be lots of code to create and analyze throughout and at the end I'm going to give you an example application, which is a Java web application, which does have a problem in it, and we'll work together to find the source and fix it. Throughout this course you can use any IDE that you like, I'm using Eclipse, but if you prefer Netbeans or Intellij, that's absolutely fine, there's nothing in this course that is specific to any development environment.
I'm using Java 8 on this course, but it's equally valid for Java 6 and above and if there are any differences in the Java versions I'll be explaining that as we go. Later on in this course we'll be using some open source software that's freely downloadable from the internet to further analyze and dig into the code that we're writing. But we've got a long way to go till we get to that, so let's get started in the next chapter which is going to be how memory works in Java. I'll see you there.
- How memory works in Java
- Passing variables by value
- How objects are passed
- What are escaping references?
- How to avoid escaping references with collections and custom objects
- Garbage collection and generation sizes
- Detecting soft leaks
- Choosing a garbage collector
- Tuning a virtual machine
- Fixing a memory leak