Carey Brown wrote:
Lines 24, 25,28, and 29 are not contained within a method. No closing brace for the class.
Glenn Strong wrote:it kept giving me an error message every time i put a closing brace and so when i took it out thats when i got this one.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Campbell Ritchie wrote:1 % 2??? You can leave that term out altogether because it will reduce to 1 *
Campbell Ritchie wrote:You can simplify that more by omitting the () because the * has a higher precedence than +. You can simplify the expression more by giving proper names to the variables: s0 and v0 are very poor names, and a/t are hardly better.
Campbell Ritchie wrote:Don't use superscripts for squares because
1: Java® doesn't implement an exponentiation operator, and 2: x * x is usually faster and more precise than x²
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|