Ben Chuanlong Du's Blog

It is never too late to learn.

Java Unit Testing

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

import static org.junit.Assert.*;

assertEquals

assertArrayEquals

Use reflection to test private methods.

References

https://javarevisited.blogspot.com/2018/09/junit-testing-tips-constructor-is-called-before-test-methods.html

https://medium.com/mindorks/how-to-unit-test-private-methods-in-java-and-kotlin-d3cae49dccd

Java Reflection

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://www.oracle.com/technetwork/articles/java/javareflection-1536171.html

https://stackoverflow.com/questions/37628/what-is-reflection-and-why-is-it-useful

GUI Frameworks for Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://stackoverflow.com/questions/7358775/java-gui-frameworks-what-to-choose-swing-swt-awt-swingx-jgoodies-javafx

https://docs.oracle.com/javase/tutorial/uiswing/index.html

Enumeration in Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. You can associate values with enumeration elements.

Variables in Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. There are 3 different types of variables in Java: instance variables, local variables and argument variables. An instance variables will be initialized to default values if it is not initialized manually …