Possible Duplicate:
& vs && and | vs ||
What are the cases in which it is better to use unconditional AND (& instead of &&)
While checking for the simple AND condition, i can use '&' and '&&'. It works fine with '&' and as well as '&&'. Is there any difference between those two.
sample code:
if(sample!=null & sample.size())
if(sample!=null && sample.size()