-20

This is a question I had asked: Difference between Integer, int and IntStream in Java

I agree a part of it is a duplicate question that is int & Integer in Java.

The other half of the question is not available anywhere. I got a comment saying "This question is too broad. Please refer to their respective Javadoc." If it was in the JavaDoc why would I be asking? The second part of my question was is IntStream similar to lists in python?

Well no body cares about why a question is asked, lets just down vote & say duplicate or too broad. Can somebody tell me how my question was any of this?

The whole point of putting up this question was to get a comparison. Not to get comments like:

"Dear SO: I know where to find the answer, but TL;DR. Please spoon feed me."

Do you think it's a joke I posted a question?

I have deleted the question after 6 down-votes and I could see more coming for no reason.

The first page of Stack overflow says - " With your help, we're working together to build a library of detailed answers to every question about programming."

I would like to know why the community is turning negative & isn't there an option to appeal against such negativity?

Edit :

My expectation was to get a simple comparison if possible .

Not to get advised to read the doc. The doc doesn't answer my question since I am comparing a Java type to a Python type and I expected an answer from somebody who has worked with these and not from others who ask me to read the doc or just tag it duplicate(though its not!)

24
  • 5
    It is definitely too broad. IntStream is part of the new Stream API in Java 8, for which the reference documentation is quite long docs.oracle.com/javase/8/docs/api/java/util/stream/…. And furthermore, int / Integer and IntStream have nothing in common. Which you will figure out when you'll read that doc I just linked you to.
    – Tunaki
    Apr 25, 2016 at 15:25
  • 6
    "The other half of the question" sounds like your question might be a bit broad.
    – ryanyuyu
    Apr 25, 2016 at 15:26
  • @Tunaki Thats the whole point why can't someone who knows about IntStream just put too sentences about it? I did ask a question is it similar to lists in python? I asked this because I see functions which are similar to it in the Javadoc. I am not a native java user, I just wanted to know.
    – Ani Menon
    Apr 25, 2016 at 15:28
  • Because it takes more than two sentences... =/ It takes.... as long as that documentation is. How can you learn something by knowing two broad unhelpful sentences about it?!
    – Tunaki
    Apr 25, 2016 at 15:29
  • @ryanyuyu Are you saying I should have put out two questions instead? Difference between Int & IntStream and Is IntSTream a List? Would that be specific enough?
    – Ani Menon
    Apr 25, 2016 at 15:31
  • @Tunaki have you seen the documentation of "int" the primitive type? Its just 4 lines. And Integer pages.. But its difference is put out in simple terms here So I just wanted something similar.
    – Ani Menon
    Apr 25, 2016 at 15:38
  • 3
    Yes you did. But before we continue arguing, please read the Stream documentation and realize that an IntStream is not even a number. It can't be compared to an int. It is a completely different world and aspect of the API. I wish it were so simple to explain functional programming and streams in two sentences. Unfortunately, it takes hundreds of books. There are a lot of questions about very tricky parts because it is not necessarily an easy read. By the way, I know the doc about int and, no, it is not 4 lines docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.2
    – Tunaki
    Apr 25, 2016 at 15:44
  • "Dear SO: I know where to find the answer, but TL;DR. Please spoon feed me." - You can flag comments like that. Hover over the the space to the left of a comment and you'll see an up arrow and a flag. Click the flag and choose one of the options ("Not constructive" would be a good choice for that one.).
    – BSMP
    Apr 25, 2016 at 15:46
  • @Tunaki If that was posted as a reply I would have just accepted it because I am not a java person and I just wanted a simple overview.
    – Ani Menon
    Apr 25, 2016 at 15:48
  • Then you would have accepted a vague answer... Not helpful in my book.
    – Tunaki
    Apr 25, 2016 at 15:48
  • @Tunaki I actually would have asked question if atleast some part of it was explained. I see questions like convert IntStream to List. Now tell me how does that work if int and IntStreams are very different?
    – Ani Menon
    Apr 25, 2016 at 15:50
  • 4
    What I can honestly suggest you to do is to take a good coffee, open that doc and read it through. Then consider reading Java 8 In Action. That'll take a couple of other coffees. After that, your thoughts will be more clear about what the Stream API is. To your comment int and IntStreams are very different <-- think about this for a minute. Think about what an int is. Now think about what an IntStream is. And see the problem.
    – Tunaki
    Apr 25, 2016 at 15:52
  • 7
    Remember that asking a question on StackOverflow should be a last resort after you've done all the research you can on your own. It's good that you found the duplicate question for int and Integer... now that one step further and look into what IntStream is. If you don't understand an aspect of it, research that specific part in more detail. Look at other questions on SO. Find an example of how people use IntStream. Only once you've exhausted all other options should you post on SO. Even then you need to make sure your post is clear and concise.
    – Mage Xy
    Apr 25, 2016 at 15:55
  • 2
    If someone had literally posted an answer telling you to read the docs, that should've been downvoted. No one did that. They posted a comment telling you to read the docs. Your question was entirely too broad. If, after reading the documentation, you still didn't understand something about IntStream, then ask specifically about that. If you don't understand anything about IntStream, then nothing we can write on Stack Overflow will help.
    – Savior
    Apr 25, 2016 at 16:11
  • 2
    Don't edit insults into your post. Meta is for discussions, not rants.
    – BSMP
    Apr 25, 2016 at 16:30

1 Answer 1

1

You were smart enough to find the documentation, so why not just read it?

People like to see the questioner put in effort to solve their own problems. Putting in effort ensures that you have a good idea what questions can be answered in a reasonable amount of space.

Better yet, if you found the answer, you could have posted a Q+A pair.


Looking at the question, I see no research effort. Without enough research effort, it looks like you're asking for us to teach you Java. It's necessary to certain parts of a language before you learn more complicate parts.

Try to keep questions as focused as possible. As it currently stands, the second part of your question requires knowledge of both Python and Java (which is only acceptable for Jython :)).

(To answer your question, IntStream is a type of list that also has streaming capabilities. I assume that Python lists are comparable to Java collections/lists.)


For us low rep users, here is a screenshot (thanks NathanOliver):

question

8
  • 1
    screen cap for you: i.stack.imgur.com/ZmsAa.png Apr 25, 2016 at 15:56
  • @Laurel I wanted to get a brief comparison. I could have put up a little about int and Integer, but I don't know much about IntStream. Whatever I read made it look similar to an integer list in python. If I were planning to read the doc of every question I get, then stack-overflow is useless. Its a community to help each other, not to ask everyone to read the original docs.
    – Ani Menon
    Apr 25, 2016 at 16:01
  • @Laurel I was specifically asking a question and now you answer it IntStream is a type of list that also has steaming capabilities. I assume that Python lists are comparable to Java collections/lists. Why didn't you put it up earlier?
    – Ani Menon
    Apr 25, 2016 at 16:15
  • @AniMenon There's little point posting something to a post that's going under. (And also, I just read all that info off the Docs.)
    – Laurel
    Apr 25, 2016 at 16:19
  • @Laurel Well I was expecting some Jython Hero to help me with it :P The point is you may check the comments and the actual post, most of the users commenting are just trying to prove me wrong rather than help, it looks like none of them had any idea of intStream but just wanted to down-vote.
    – Ani Menon
    Apr 25, 2016 at 16:19
  • 2
    If I were planning to read the doc of every question I get, then stack-overflow is useless I encourage you to make Stack Overflow useless for you :). Stack Overflow is not "a community to help each other" it is "a question and answer site for professional and enthusiast programmers" whose goal is "to build a library of detailed answers to every question about programming". That's literally from the first paragraph of the tour which you were required to read before your first question. IMHO, if you've not read the docs, you're neither a professional, nor terribly enthusiastic. Apr 25, 2016 at 16:22
  • @MikeMcCaughan Not to argue on being a Java professional. I don't work with it, I am an enthusiast hence wanted help on a comparison from someone who knew both Java & Python.
    – Ani Menon
    Apr 25, 2016 at 16:24
  • @AniMenon You do realize that I don't really know Python? I've used Jython, but I never got further than the basics of Python. I just literally read the docs. The information is there.
    – Laurel
    Apr 25, 2016 at 16:32

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