Anyone who has the source code to a program can compile it for their machine because they can convert it to machine code. However, a compiled code can rarely, if ever, be converted back to its source code. It's a one way street.
Firstly java compiled(some would prefer to say "translated") to byte code, which then either compiled, or interpreted depending on mood of JIT. Java is a compiled programming language, but rather than compile straight to executable machine code, it compiles to an intermediate binary form called Java Virtual Machine byte code. So it is Called Both Compiled And Interpreted Language. If you want to get help in java assignments then you can get help at CodeAvail- Online Computer Science Assignment