29

I am a Java developer and I am working with Beans everyday. I am curious about the history of the name "Bean". Does it just comes from coffe bean, or is there something else?

4
  • 4
    "Java coffee refers to coffee beans produced in the Indonesian island of Java." (en.wikipedia.org/wiki/Java_coffee) That also explains coffee mug.
    – interlude
    Sep 4, 2013 at 8:41
  • 14
    You should also know that every .class file begins with the hexa string 0xCAFEBABE. Sep 4, 2013 at 8:45
  • 2
    @ZenunKastrioti be careful. Java seems cute but it can tear you apart with timeouts and out of memory errors.
    – interlude
    Sep 4, 2013 at 9:42
  • I don't know but I find it strangely satisfying to serialize a java bean into "myObject.bean".
    – Dmytro
    May 3, 2018 at 2:07

4 Answers 4

43

Yes, indeed. It refers just to coffee beans (which can be stored in jar, by the way ...)

3
5

Yes it stands for a coffee bean..

Some trivia: Java stands for the Java coffee consumed by the developers

4

I think that it also comes from the idea of "self-contained" (object). If you look at the coffee beans, they are scattered, i.e. unrelated to each other. Once Sun wanted to come up with such objects, which you could single out from your system and passiviate on the disk or marshall to another node of distributed system, they needed a name for that category of objects and thus they looked around, discovered them on the Java island and coffee around. But I do not think that coffee is only important. Why do you think that the type of the object is less important for its name than the connotation of Java language with the island in the Pacific rim?

3

actually when they were developing java, the developers consumed so much of coffee so they made it as their symbol.

and then so as the beans are small parts of the coding they named it as beans corresponding to small coffee beans.

and finally those small parts are compressed and saved as one in a .jar file. so you can can say beans are stored/placed in a jar

2
  • 4
    Yes, that's right. But Java was not the first choice. It was initially called "Oak" (because James Gosling had a view from out of his window on an oak tree that stood outside the Sun offices building), but that name had to be changed because it was trademarked by some other company. Sep 4, 2013 at 8:58
  • @jeroen_de_schutter ya thats true, but as the question was why is it called beans so explained that much part only
    – dhpratik
    Sep 4, 2013 at 9:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.