For written homework assignments, typed assignments are preferred. Handwritten is also fine, but it is often more difficult to organize your work clearly and legibly so that the TA can give a good grade. Writeups for programming projects must be typed and turned in electronically.
Some problems on the written assignments ask you to give an algorithm to solve a problem. Unless the assignment specifically tells you to implement the code and run it, pseudocode is acceptable. Pseudocode means that you do not need to write every line in Java with correct syntax; English explanations of operations are acceptable. The general rule you should follow is that you can substitute English for any O(1) operation, but not for more complex steps. Thus, the following would not be acceptable:
scan the list and count all elements greater than x
while the following would be acceptable
while list has more elements
increment counter if current element is greater than x
move to next element of list
The idea is that you do not need to give all the nitty-gritty coding details (that is the purpose of the programming assignments), but you should demonstrate a clear understanding of what your algorithm does and where those nitty-gritty details would need to be.