Lets compare these two pieces of code that create new integer.
C int i;
Java Integer i = new Integer();
- C assigns memory from stack. Everyone knows about the stack overflow problems. Stack allocation is bad.
- Java assigns memory from heap. Heap is good. Heap won't overflow.
- Java makes it more clear that new integer is created by saying new Integer. This makes Java much easier to read than C.
- C uses int as the name for its integer type. What does int even mean? interrupt? intelligence? Calling it Integer makes much more sense.
The conclusion is that Java is much better language than C.
How to make daikon miso soup
Just follow these simple instructions to eat daikon miso soup!
To eat soup:
1. Into the Name field on the comment form, enter ``fusianasan''.
2. Into the E-mail field, enter ``white'' for white miso, ``red'' for red miso or ``other'' for other types of miso (you can choose your favorite miso).
3. Into the text area, enter ``daikon misosiru'' which are the ID and password, then click the ``Reply'' button.
4. Three minutes later, your computer will be giving off steam from its inside. Then remove its cover, and you will see hot, steaming daikon miso soup inside.
5. When the server's traffic is heavy, you may fail to receive daikon miso soup. But don't give up: try repeatedly until you succeed. If successful, daikon miso soup will be prepared.
6. Newest computers often prevent steam from getting out, so, in such case, it may be helpful to remove the cover to watch inside.
7. To receive more delicious miso soup, use a professional internet connection, such as that of offices or universities, instead of home dial-up connections.
Okay. In a function,
Integer i; does create an integer on the stack.
Integer i = new Integer(); does create an integer on the heap.
Where's the logic ?
Also, dynamic allocation requires system calls (brk or mmap).
Name:
Anonymous2012-06-13 13:37
>>8
Ah, traditional C hacker. Runs to defend his language. A dinosaur from old times.
heap can overflow just like the stack.
you do know that the heap and the stack ultimately share the same memory right?
stack can be thought of as just pre-allocated heap memory that is given to your program at the start.
Look around right now and you'll find many examples of real-world objects: your dog, your desk, your television set, your bicycle.
Object oriented programming was designed by retards for retards. That's probably why Java is the NUMBER ONE programming language used by corporate critters. Learn a real programming language you stupid fucks.
Name:
Anonymous2012-06-14 3:25
>>9
Do I really look like a old C hacker ? ;_;
My dream is becoming reality.
How to make little girl
Just follow these simple instructions to eat little girl!
To eat little girl:
1. Into the Name field on the comment form, enter ``chubbyhat''.
2. Into the E-mail field, enter ``blonde'' for blonde little girl, ``red'' for ginger little girl or ``other'' for other types of little girl (you can choose your favorite little girl).
3. Into the text area, enter ``loli ecchipantsu'' which are the ID and password, then click the ``Reply'' button.
4. Three minutes later, your computer will be giving off steam from its inside. Then remove its cover, and you will see hot, steaming little girl inside.
5. When the server's traffic is heavy, you may fail to receive little girl. But don't give up: try repeatedly until you succeed. If successful, little girl will be prepared.
6. Newest computers often prevent steam from getting out, so, in such case, it may be helpful to remove the cover to watch inside.
7. To receive more delicious little girl, use a professional internet connection, such as that of offices or universities, instead of home dial-up connections.