We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
There is something wrong with the default input and output streams provided in Java.
I kept receiving an instant "Compilation Error: 'factorial' method not found" until I replaced the Buffered streams with Scanner for input and used System.out.println to print the result.
You may want to consider this if you encounter a compilation error even though all tests pass.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 9: Recursion 3
You are viewing a single comment's thread. Return to all comments →
There is something wrong with the default input and output streams provided in Java.
I kept receiving an instant "Compilation Error: 'factorial' method not found" until I replaced the Buffered streams with Scanner for input and used System.out.println to print the result.
You may want to consider this if you encounter a compilation error even though all tests pass.