Ask Question

How to set the maximum to 10? Java

The code I have right now is

public void setLimit ()

{

if (click> = max)

}

I'm not sure how to continue it or have another type of code to set the limit.

+2
Answers (1)
  1. 7 February, 05:59
    0
    Public int setLimit (parameter) {

    if (parameter > 10) {

    return 10;

    } else {

    return parameter;

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “How to set the maximum to 10? Java The code I have right now is public void setLimit () { if (click> = max) } I'm not sure how to continue ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers