Hello, when in this requeriment says "The getCarsCount() method must return any constant int value." what is the meaning of "constant?
I search, and i found that the meaning of constant is equal a parameter "final" .
constans value
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Dương Tiến Đạt
6 April 2020, 02:14solution
Just return any int literal, e.g 10. That's constant because it won't change no matter how many times you run the code. P/s: remember each class' method has difference return value.
+4
hidden #10529213
31 March 2020, 13:19useful
A constant is a variable whose value cannot change once it has been assigned
+2
Misiu
31 March 2020, 11:30useful
Any int number (positive).
e.g. I have: return 5;
+2