April 2017
Beginner
504 pages
14h 11m
English
We have already looked at the code for the class code and it was the simplest class in the world. In reality, as it is in the GitHub repository (https://github.com/j9be/chapter04 or https://github.com/PacktPublishing/Java-9-Programming-By-Example/tree/master/Chapter04), the code is a bit more complex:
package packt.java9.by.example.mastermind; /** * Represents a color in the MasterMind table. */ public class Color { /** * A special object that represents a * value that is not a valid color. */ public static final Color none = new Color(); }
We have a special color constant named none that we use to signal a reference that is of type Color but is not a valid Color. In professional development, we used the null ...
Read now
Unlock full access