Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on If.... Parent comment
File createFile(String name, boolean istemp) { if (istemp) // do temp stuff else // do regular file stuff }
That's an 'if' statement that only exists as a response to the boolean parameter. We can remove the 'if' by having two methods instead:
File createFile(String name) File createTempFile(String name)
There are no comments on this comment yet.
File createFile(String name, boolean istemp) { if (istemp) // do temp stuff else // do regular file stuff }
That's an 'if' statement that only exists as a response to the boolean parameter. We can remove the 'if' by having two methods instead:
File createFile(String name) File createTempFile(String name)