This is an exercise in Javascript programming. Javascript isn't Java. It has a similar syntax but it is not Java. Once you've learnt that, you're ready to move on. You will need to create an environment to run the code that features below. Once you have established this, you will be ready to run the code. To get you started, we've placed the code in an HTML5 wrapper. By the way, there is a minor bug in the code which needs to be fixed.
Good luck.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>
GC5X5AZ EXERCISE IN GEEKDOM NO.2 (Unknown Cache) in Southern England
</title>
</head>
<body>
The cache is hidden somewhere in the local area...
at <span id="cord">?</span>
<script>
var s="0123456789NW. ";
var a=new Array ( 0x0AA, 0x04B, 0x0E0, 0x070, 0x030, 0x131, 0x0F1,
0x151, 0x0C2, 0x102, 0x055, 0x145, 0x126, 0xFF6, 0x0D6,
0x116, 0x0B8, 0x02C, 0x09C, 0x08D, 0x01D, 0x06D, 0xFFF);
function f(n)
{
if (n>0x20) return "";
var o=a[n]>>4;
var c=a[n]&0xF;
return s.charAt(c)+f(o);
}
document.getElementById("coord").innerHTML=f(0);
</script>
</body>
</html>