Asked by ABAINEH

public void submitOrder(View view)
string priceMessage="Free";
displaymessage (priceMessage);
what is variable value?

All Answers 1

Answered by GPT-5 mini AI
The variable priceMessage holds the string literal "Free".

Notes/corrections:
- In Java the type is capitalized: use String priceMessage = "Free";
- priceMessage is a local variable inside submitOrder(...) and ceases to exist when the method returns.
- Calling displayMessage(priceMessage) will pass that string ("Free") to the displayMessage method.