##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.

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.**

 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.**

 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__](http://stackoverflow.com/questions/18201191/what-is-the-best-way-to-get-the-first-letter-from-a-string-in-java-returned-as) has 4 upvotes.
 - [A similar question about the same __problem__](http://stackoverflow.com/questions/5163785/how-do-you-get-the-last-character-of-a-string) has 27 upvotes.
 - [An actual specific question about the same API](http://stackoverflow.com/questions/1071965/using-scanner-next-to-get-text-input) has 4 upvotes.

So it's really all about writing a well-researched, specific question.