In C, I can allocate a register for a variable, for example:
register int i = 0;
I am aware that Java is an interpreted language, and is many many abstractions away from the CPU.
Is there any mechanism available to even request (and if the architecture doesn't allow it, so what) that my variable remains in a register instead of moving to cache or main memory?
I don't suppose there is any way, but I have been pleasantly surprised before.
Thank you,