Summary
We demonstrated techniques for refactoring, debugging, and testing code using NetBeans and Eclipse. Tools and techniques such as these make our lives as developers much easier.
Several refactoring techniques were explored. Converting an anonymous inner class to a lambda expression is a common technique when converting older code to use Java 8. This operation is easy to achieve and the IDEs provide several options for controlling the ultimate appearance and form of the results. The conversion of multiple occurrences of anonymous inner classes was demonstrated. We also illustrated other refactoring techniques in support of Java 8.
There are numerous application debugging approaches available. We illustrated several of these using IDEs. When in debug mode, the IDEs display the program stack and variables as it executes. This can be particularly useful when debugging recursion methods and lambda expressions. We also demonstrated the use of the peek
method to help debug streams.
Testing...