Coders I interview I ask for pseudo code. I don't care about what languages they know or don't know but how they approach a problem and how they find the solution. Many roads lead to Rome so it difficult to say, this is wrong or right or if this is even better or worse.
The best java programmer I ever hired was a truck driver who loved math. He couldn't really code when I hired him, but he knew how to organize a problem and find a solution that would work.
I've had interviews where I've been asked to write code and sometimes I did. Most of the time I just end up leaving. Most good coders are language agnostics and can figure out how to do what is necessary in whatever tool fits the situation.