Open blank-bank opened 3 years ago
Errr.. this is embarrassing.
The default version of Java used by classroom auto-grader is Java 1.8, which doesn't recognize strip()
.
It is embarrassing because of 2 reasons:
build.gradle
file to use Java 11.trim()
from previous iterations and never checked for strip()
which would have caught the issue.Since this assignment is already published, please use trim()
to keep the auto-grader happy.
In fact, the hint in the module website also suggests trim()
Playing coverup: trim
is not deprecated, so we are not completely wrong 😜
On a serious note: we will work to ensure both trim/strip are accepted in the future; thanks for highlighting.
Thanks Prof! Appreciate the honesty :)
Hi Prof, can i check if there are any preferences between the usage of strip() and trim() function? Ex 7 does not permit the usage of strip() from the result of my submissions.
Ive read
https://www.journaldev.com/33291/java-string-trim-method-examples#:~:text=This%20method%20uses%20Unicode%20code,it%20uses%20the%20Unicode%20standard.
and it suggests to use strip() instead of trim(). Would like to ask for any guidance on this issue. Thank you!