I am having troble entering the symbol for degree celsuis in a java label box.

I referred to a book and got the following instructions for entering the degree symbol:
Make sure that numlock is ON
Then Pressing Alt type 0186
But the Problem is that when I press numlock on my laptop (it is also my F11 key) it opens the window for Building main project.
Secondly when I press Alt and type 0186 appears in the label.
Can you describe what this number (0186) is and also why we can’t simply use 186 instead of 0186.
First of all, some background: Each font has between about 26 to 20’000 different “glyphs” (“a” is the glyph for “lower case A”, i.e. a shape which you think means something). The Unicode standard lists all of them.
Since there are many more glyphs than keys on your keyboard, a solution had to be found. That solution was Alt + character code. See here for a list: Windows Alt Key Codes. It also contains detailed instructions how to enter the codes.
The code for
°is0176, by the way, not 0186.To enable num lock on your laptop (which has even less keys than the standard 105 keys keyboard), you need to press the “Function” key (usually a blue F somewhere in the lower left corner) plus F11
Lastly, why
0176rather than176. The0actually tells Windows that you’re about to enter an Alt code. This is necessary since Alt usually controls the UI (activate controls and menus via their shortcut).