I don't know about that. At University we were made to write programs/algorithms on the whiteboard all the time - nobody expects you to memorise the Java API, but basic language syntax should not be a problem for any programmer worth his salt.
This should be standard practice for any programming class since it's such a requirement for a successful job hunt. I've done a lot of interviewing over the past 15 years and had plenty of experience being on the other side of the table as well. Written tests are very common though I've personally never been placed in from of a computer. Usually, you're only expected to demonstrate good logic and an understanding of the technology. For me, it's rarely been a matter of memorizing syntax and APIs though this does come up. A colleague of mine told me about an interview he had with a major company (may have been Amazon) where he was expected to whiteboard the answers perfectly without using any reference. I have no idea what this is supposed to achieve, but it's good to be forewarned. And no, he didn't get the job though neither would I.
Practice writing code by hand. You're going to be dealing with this a lot.