Tuesday, November 29, 2016

Transitioning to Java from C#

In C#, using String.Equals() and "==" are interchangeable (C# "special cases" the "=="), whereas in Java, there IS a big difference.

In Java, "==" is for pointer references, that is, it compares whether the actual INSTANCES are the same, whereas, to simply compare two VALUES, you have to use String.equals().

No comments: