First commit
add java code for subset