Answer by Gowtham for Java Input error: Syntax error near unexpected token
Why does java isPrime(9) cause an error? Well, the bash shell treats () specially. To know more, read the answer to this question - How to use double or single brackets, parentheses, curly braces.You...
View ArticleAnswer by Eran for Java Input error: Syntax error near unexpected token
You should run it with :java isPrime 9 The command line arguments are not passed within parentheses.
View ArticleJava Input error: Syntax error near unexpected token
Trying to create a Prime Number Tester like the code below but when I input java isPrime(9) in the terminal window, I get -bash: syntax error near unexpected token `('I want the code to read either...
View Article