How about ...
Code:
select student_id
from my_table
where course in ('java','c')
group by student_id
having count(distinct course) = 2
/