2nd Feb 2018, 5:53 PM
Rostislav
Rostislav - avatar
3 Answers
+ 1
Put brackets (aka {}) around the FindingRats method. Also, try to keep the java convention and write methods with camelCase. For this, it should be "findingRats()" Finally, you don't need to make the methods static if you call them on objects (like black.Voice();). If you make them static, you can call them just with Cat.Voice(), Cat.FindingRats(Name2) and it would do the same thing, but it is not recommended. Happy coding.
2nd Feb 2018, 6:14 PM
Tibi Mose
Tibi Mose - avatar
+ 4
CHANGE: static void FindingRats(String a); System.out.println("Finding rats."); System.out.println("Finding rats.."); System.out.println("Finding rats..."); System.out.println("Rats was found by "+a); TO: static void FindingRats(String a){ System.out.println("Finding rats."); System.out.println("Finding rats.."); System.out.println("Finding rats..."); System.out.println("Rats was found by "+a); }
2nd Feb 2018, 6:12 PM
Fata1 Err0r
Fata1 Err0r - avatar
+ 1
Thank you!
2nd Feb 2018, 6:16 PM
Rostislav
Rostislav - avatar