We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Both codes accomplish the same task. In the 1st one, the variable is declared inside the Checker class. In the 2nd one, the variable is declared outside of Checker(), and then instantiated inside Checker(). I prefer the 1st method.
Java Comparator
You are viewing a single comment's thread. Return to all comments →
Both codes accomplish the same task. In the 1st one, the variable is declared inside the Checker class. In the 2nd one, the variable is declared outside of Checker(), and then instantiated inside Checker(). I prefer the 1st method.
HackerRank solutions.