Update triangle.java