Java Quickie: Level Up Your Debugging

level up your debugging header

Level up your debugging by overriding kinda useless methods from the Object class. Return whatever message you need. Learn how! Most classes in Java already have an "in build"/ inherited toString() method. This method mostly just returns the class name and some gibberish. (actually the hex value of the object). Let's use this method to … Continue reading Java Quickie: Level Up Your Debugging

Java Quickie: Fast Array Sorting In Java 8

fast array sorting header

Fast array sorting with java 8. Thanks to its new functions you can now sort multithreaded with one line of code. Simple and Fast. Today we're gonna take a look at one of Java8's function for fast array sorting: Arrays.parallelSort(). It's kinda the same as Arrays.sort(), but differently. What's the difference? It's faster. Well, not … Continue reading Java Quickie: Fast Array Sorting In Java 8

Java Quickie: Change/ Increase Stack Size

Increase Stack Size

Tired of StackOverflowErrors? Increase stack size or change algorithm. Learn how with this Java Quickie¬† A common reason behind the StackOverflowError is due to a faulty recursion algorithm. For example calling the function inside the function untill infinity. You don't need to increase¬†stack size for this error because it wont help you. Just improve that … Continue reading Java Quickie: Change/ Increase Stack Size

Java Quickie: Exceptions In Unfinished Code

Exceptions In Unfinished Code

Delivering a library that isn't completed (for alpha testing)? Learn how to handle exceptions in unfinished code with this Java Quickie. Why should you throw exceptions in unfinished code, and why? Let me illustrate this by an example: You are creating a calculator (how creative) and have the skeleton of the class already set up. … Continue reading Java Quickie: Exceptions In Unfinished Code