Don't take all the terse comments posted above too badly. Kudos for asking what's wrong! Most people don't do that.
Newbies at programming are welcome here, but do make sure you have done your research first before asking, and be sure to make it a good question!
For two out of the three questions you seem to be referring to (this one and this one), basic Googling really is the answer: just entering the question title into Google yields you page upon page of useful results.
Questions like those get downvoted with prejudice on Stack Overflow; they are a waste of everyone's time. Never ask questions like this.
The other downvoted one, Java Exit Code -1, I can't judge because I don't know Java much, but it appears that it is something very basic, perhaps Googleable. (In fact, when I Google it, I get this?)
I don't really know what you could/should have done to avoid those downvotes, maybe someone else can chime in.
Remember, SO is not a mentoring program; it is a place where (ideally) you ask specific questions that haven't been asked before.
Good luck!