Friday 11 February 2011

Quote: Content and Substances

A quote that I suddenly came up with during work today...lol I'm sure it was inspired by 'work'....
Substance does not equal content, because substance goes with content!
If you think about it, substance is not really content! : ) Because we don't just want 'stuff' but we want 'quality' stuffs! i.e Not just blank sheet but a sheet that is of use!


One of those sudden 5 seconds realisation / inspiration moment in life...hehe : )

Sunday 6 February 2011

Java: OutOfMemoryError vs StackOverflowError

Some Java fundamentals that I read recently. Yes a bit ashamed ( : (  ) of myself that I never really considered their differences apart from knowing that they both relates to a lack of memory. But essentially the cause of their problems are actually quite different! : O


OutOfMemoryError:
Thrown when Java is running out of memory and cannot allocate any more memory in the heap for the object

StackOverflowError:
The stack space lives at the top-end of the address space and the heap lives at the bottom-end of the address space. As stack grows, it grows downwards. As heap grows, it grows upwards. So there is a potential that the two can collide and when that happens, you get a StackOverflowError thrown. Typically happens when you call some methods recursively (that keeps going-and-going).

(Really good explanation on StackOverflowError here: http://stackoverflow.com/questions/214741/what-is-a-stack-overflow-error)