This is the question I have in mind. I do not know if it is a duplicate, but let's assume that it is not.
The question is poorly asked and has a poor title, hence all the downvotes. I wonder: If the title is edited to something like "Retrieving the smaller of two numbers", and the question being along the lines of "If I have two numbers num1
and num2
, how do I get the smallest one the easiest way?", it would be a clear, specific question, and worth asking, however trivial it might seem. Perhaps it is not even that trivial, since a lot of people (myself included) would use conditions, instead of the simple Math.min()
, simply because we aren't too familiar with the Math
class. I think a rather good answer could be written for this question that draws attention to the Math
class, mentioning the different numerical primitives (the question need not be about integers).
A lot of people say "A quick Google search will get you your answer; this is a completely unnecessary question:", but since when does a question become bad because answers to it already exists on the web? Isn't the goal of Stack Overflow to build a knowledge base?
If the question is bad, why are questions like "What is SQL injection?" and "What is the difference between default, public, private, and protected?" so well recieved? They fall into the same category.
TL;DR: My suggestion is the following:
Question q = printSmallestIntegerValueJava.clone();
if(onTopic(q.improve()))
printSmallestIntegerValueJava.improve().reOpen();
On second thought, perhaps it is just better to close it and write the better question and answering it yourself. The reputation will go to the correct person, and nobody else has to "waste" their time answering the question when you can do it yourself.