问题是什么? priceMessage
没有向我显示问题,因此我可以修复它
为什么它显示一条灰线,没有红色警告?
我试图弄清楚发生了什么,但没有任何作用
那么 priceMessage
有什么问题吗?
private int calculatePrice() {
int price = quantity * 5;
return price;}
public void submitOrder(View view) {
int Price=calculatePrice();
String priceMessage = " total "+ Price;
priceMessage = priceMessage + "\n Thank you";
displayMessage(priceMessage);}
private void displayMessage(String message) {
TextView priceTextView = (TextView) findViewById(R.id.price_text_view);
priceTextView.setText(NumberFormat.getCurrencyInstance().format(message));
}
最佳答案
关于java - Java中灰线没有解释如何查找问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56676581/