What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

I'm talking about this question: for(int j=0; j>=6; j ) { System.out.println(stringList.get(j)); } why it is not working?.

It is a kind of obvious solution, but it is a practical and answerable question, it was most probably even a problem that the OP faced. Literally from the FAQ:

You should only ask practical, answerable questions based on actual problems that you face.

To me it seems that it is, actually, a good question answering al SO's FAQ's demands.
Then it got a score of -6 (actually -7. but I upvoted)...

And it got closed as not a real question!
Literally from the grey block saying the question is closed:

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form.

  • It's absolutely clear what was being asked there, so it is not vague
  • All relevant information was present (well, maybe you could argue the OP did not include the error message, but that was not necessary for solving the problem. Anyway, many question on SO don't come with the exception and errors etc. at first. No reason to close).
  • It isn't broad, the answer was to change one character, and you could explain why in one sentence.
  • It is reasonably answered, so that is possible (or one should assume all people on SO are supernatural, whatever is more likely).
  • I wouldn't call it rhetorical.

It couldn't even have been closed as too localized because it is a common problem. The only thing I could think of is a duplicate, but that is not the case here.

share|improve this question
6  
Possibly because the OP made no effort to figure out the issue. One run through a debugger would have shown the OP what the issue is, as would a bit of thinking about the loop. –  Oded Jan 2 '13 at 12:47
4  
"why it is not working?" is a terrible problem description. Just because you can guess at what might not be working, the lack of an actual error description makes this a NARQ closing target. –  Martijn Pieters Jan 2 '13 at 12:47
1  
@MartijnPieters It was one line of code, so I wouldn't say it is diffficult to tell what was not working. –  11684 Jan 2 '13 at 12:48
2  
Sure, but when asking a question, one should be describing what they find is wrong. Leaving it to others to figure out means some will get it wrong. –  Oded Jan 2 '13 at 12:50
    
@Oded I never do that (I wouldn't even know how), my problem-solving technique with this kind of problems is to look at it until I see the problem. Sometimes I just don't see it and I go to SO (okay, even I would spot this bug, but I hope you got my point). –  11684 Jan 2 '13 at 12:50
8  
It is answerable, and it's also extremely localized. I agree with the closure, just not the reason chosen. –  Tim Post Jan 2 '13 at 12:52
    
@Oded The code inside the for loop is not being executed, that is almost the same as 'it doesn't work'. There is no error message, just a bit of code is skipped. Someone starting with Java wouldn't know anything better than 'it doesn't work'. –  11684 Jan 2 '13 at 12:52
    
@TimPost I disagree with that it's extremely localized. It is a common problem, I encounter it often enough (mostly a typo, and I can solve that without SO, but some not). –  11684 Jan 2 '13 at 12:53
1  
Surely the first thing you should do when something doesn't work is to try find out why @11684. The OP hasn't made even a cursory effort to do so... and is instead complaining that it "doesn't work". –  ben is uǝq backwards Jan 2 '13 at 12:54
1  
Unfortunately the close reason options given adopt a broader criteria by the community than dictated by the system, often seeing "not a real question" synonymous with "can't believe someone would ask this", for instance. –  Grant Thomas Jan 2 '13 at 12:54
    
@Mr.Disappointment Thanks, is there a metaquestion that lists these synonyms? –  11684 Jan 2 '13 at 12:55
7  
@11684 The probability of someone having that issue, not noticing the obvious cause, searching for it and then finding that question has got to be negligible. If the question were more along the lines of why Java doesn't warn you about code that will never be executed like that, it would be a much better fit, but still unlikely to help someone frantically searching after mixing > with <. I'm a little annoyed with the response the OP received in some comments (which I cleaned up), but I strongly agree with the closing. –  Tim Post Jan 2 '13 at 12:57
1  
@11684: Once you figured out the answer to the question it is of course obvious what is meant by "not working". But if you don't know the answer yet and are trying to solve the problem it would surely make it simpler to know what goes wrong. Otherwise you ask yourself all those unnecessary questions, like "Are there any syntax errors?", "Does he access the array out of bounds?", "Is stringList even an array? What kind of object is it? Does it have a get() that expects an int parameter?". Error search would be much more straight forward with a helpful description of the problem. –  sth Jan 2 '13 at 13:25
3  
Oh, come on, @sth, not here. It's one short line of code, the typo jumps out. Yes, not a good question at all, but real enough. Too localized. (Although common enough, that sort of typo isn't searchable for the pertinent audience.) –  Daniel Fischer Jan 2 '13 at 14:17

1 Answer 1

up vote 9 down vote accepted

He didn't mention what happens when it's "not working". Compiler error? Runtime error? Or did he expect to see something and is he seeing something else? If so, what did he expect to see? The question is too vague, thus it was closed as NARQ.

Secondly, he hasn't shown any effort on his own part to grok the problem. See http://stackoverflow.com/questions/how-to-ask

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .