In the previous lesson you learnt how to debug a class. Previous lesson: 10.3 How to debug a classCourse Contents Collections and maps The Java Collections Framework provides a set of classes and interfaces that let you manage groups of related objects in a more powerful way than arrays. In this section you will learn: How the collections fra...
In the previous lesson you saw how to test a class. Previous lesson: 10.2 How to test a class using JUnitCourse contents How to debug a class Finding where you have a bug in your classes can sometimes be a time-consuming process. To help you, NetBeans incorporates a debugging tool that lets you set one or more breakpoints at any point in your code....
In the previous lesson we saw how to document your classes using the Javadoc tool. Previous lesson: 10.1 How to document your classesCourse contents How to test a class using JUnit Testing that your classes do what they are supposed to is an essential part of software development. In practical terms, it is impossible to ensure that software is tota...
In the previous lesson we looked at recommended overrides from the Object class, Previous lesson: 9.3 Recommended overrides from the Object classCourse contents Documentation, testing, and debugging Java provides a built-in tool to help you document your classes. NetBeans incorporates the JUnit testing tool and a debugging tool. In this section you...
In the previous lesson we looked at preventing the compromisation of immutable classes. Previous lesson: 9.2 Preventing the compromisation of immutable classesCourse contents Recommended overrides from the Object class You will recall that every class (both those supplied by Java and those you write yourself) inherits from the Java supplied class c...
In the previous lesson we looked at immutable classes. Previous lesson: 9.1 Immutable classesCourse contents Preventing the compromisation of immutable classes Whenever you decide to create an immutable class, you need to take steps to ensure the immutability is not compromised, since you may have coded the rest of the application on the stri...
In the previous lesson we built the Person utility class. Previous lesson: 8.3 Person utility classCourse contents Immutable classes and the Object class Immutable classes are those which don't enable their state to change after they have been constructed. The Object class provides a core set of functionalities inherited by every Java c...
In the previous lesson we discussed what utility classes are. Previous lesson: 8.2 Utility classCourse contents Person utility class Now that you have a separate Utilities project containing the Gender enum, you can create the class called Person in the com.example.util package of Utilities: package com.example.util;public class Person { // I...
In the previous lesson we looked at refactoring. Previous lesson: 8.1 RefactoringCourse contents Utility classes When developing any application, it makes sense to reuse classes which have already been developed, assuming you can find something suitable, of course. This will save you the time of having to specify, code and test something from scrat...
In the previous lesson we created our own Exception class. Previous lesson: 7.3 Creating an Exception classCourse contents Refactoring and utility classes Refactoring refers to the process of improving how you application is internally structured. Utility classes can be defined to provide commonly used services for multiple applications. In this se...