bamba
BAN USERJVM runs bytecode; sometimes it tries to run native code (HotSpot); it may (or may not) use some optimization tricks to make native code run faster.
For instance, it may try to replace reference to boolean onto actual value (true or false) if it believes nothing can change that value. So that by using "volatile" we are telling JVM that this value might be changed by another thread.
And I'd love to add: if someone hits computer by a hammer (such as System.exit(0) or OOM or something else like a real hammer! For instance, Amazon EC2 instances frequently freeze... unpredictably, for few minutes... just because of virtualization: single CPU shared by 16 clients...)
- bamba May 10, 2012In Java: Capability of an action/method to do different things depending on type of an object; also relates to method overloading / overriding
From Wikipedia: "feature that allows values of different data types to be handled using a uniform interface"
Sample: interface Paintable { void paint(); }
And not only Shapes, but also Cars, Dogs, Fruits, Artists... everyone/everything can paint :)
From Wikipedia: "feature that allows values of different data types to be handled using a uniform interface"
In my own words: ability to call different things the same name
In Java: Interface.
Sample: interface Paintable { void paint(); }
And not only Shapes, but also Cars, Dogs, Fruits, Artists...
Capability of an action/method to do different things depending on type of an object; also relates to method overloading / overriding
What about just changing "comparator" in a standard algo so that 5 > 100, and 5 < 99:
- bamba May 10, 2012100,5,7,99
Ha-Ha ;)