##You can ask about basic programming in Stack Overflow.
You can ask about basic programming in Stack Overflow.
It's perfectly fine to ask about basic conceptual issues in programming, about how to structure your code and all sorts of code issues.
##This question got downvoted because it was poorly researched and written.
This question got downvoted because it was poorly researched and written.
Questions like "What does the method foo
do" for a very common foo
are bad because:
- There is no real problem being solved or the issue is not specific enough.
There is no real problem being solved or the issue is not specific enough.
In this case, the asker could have found out what it does by doing
System.out.println(word)
. Had the question been, "How do I get the next token from a scanner?" or "How do I print the first character in a string?" (assuming those are not dupes), it would have been better accepted.
In this case, the asker could have found out what it does by doing System.out.println(word)
. Had the question been, "How do I get the next token from a scanner?" or "How do I print the first character in a string?" (assuming those are not dupes), it would have been better accepted.
- Any research would have helped the asker.
Any research would have helped the asker.
While I'm not a Java fan, it's hard to deny the quality of its documentation. Googling "Java Scanner Next API documentation" would have easily landed the asker on a good help page. Had the question being about a more obscure API, it would have been better accepted. The fact that it's such a common, well-documented API is telling.
While I'm not a Java fan, it's hard to deny the quality of its documentation. Googling "Java Scanner Next API documentation" would have easily landed the asker on a good help page. Had the question being about a more obscure API, it would have been better accepted. The fact that it's such a common, well-documented API is telling.
To illustrate:
- The duplicate of the asker's problem has 4 upvotes.
- A similar question about the same problem has 27 upvotes.
- An actual specific question about the same API has 4 upvotes.
So it's really all about writing a well-researched, specific question.