This is the code :
public class Triangle {
private String color;
private int height;
public Triangle(String color,int height){
this.color = color;
Here, the first argument will be matched to the first parameter of each method and then the parameter will be matched.
I would suggest the solution below to help remove ambiguity
If you want to call your first constructor use
If you want to call your second constructor use
So that resolves the ambiguity
EDIT :-
Please read more about this problem here.