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?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Han
  • 592
  • 2
  • 6
  • 9
  • 4
    "Java coffee refers to coffee beans produced in the Indonesian island of Java." (http://en.wikipedia.org/wiki/Java_coffee) That also explains coffee mug. – interlude Sep 04 '13 at 08:41
  • 14
    You should also know that every .class file begins with the hexa string 0xCAFEBABE. – Arnaud Denoyelle Sep 04 '13 at 08:45
  • 2
    @ZenunKastrioti be careful. Java seems cute but it can tear you apart with timeouts and out of memory errors. – interlude Sep 04 '13 at 09:42
  • I don't know but I find it strangely satisfying to serialize a java bean into "myObject.bean". – Dmytro May 03 '18 at 02:07

4 Answers4

43

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

jeroen_de_schutter
  • 1,843
  • 1
  • 18
  • 21
5

Yes it stands for a coffee bean..

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

Kelevra
  • 95
  • 10
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?

Val
  • 1
  • 8
  • 40
  • 64
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

dhpratik
  • 1,100
  • 4
  • 19
  • 43
  • 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. – jeroen_de_schutter Sep 04 '13 at 08: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 04 '13 at 09:12