Skip to content

Instantly share code, notes, and snippets.

@blefebvre
Last active June 11, 2020 10:51
Show Gist options
  • Save blefebvre/26115f8bd6f36a465c5add8812d50fd7 to your computer and use it in GitHub Desktop.
Save blefebvre/26115f8bd6f36a465c5add8812d50fd7 to your computer and use it in GitHub Desktop.
int count = 1;
count = "1"; // Type mismatch: cannot convert from String to int
public double total(double price, int count) {
return price * count;
}
this.total(3.99, "10");
// The method total(double, int) in the type PriceController
// is not applicable for the arguments (double, String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment