I know the Neumann B.C. is implicit in FEM language. However, I have seen at least two ways to impose Dirichlet B.C.
e.g. for the following problem 1D,
$$\nabla^2 u + \nabla u= 0, u_{left}= 1, u_{right}=0$$
set first and last row of assembled "A" to "0" at left hand side, set A(1,1)=1,A(end,end)=1, and specify the boundary value "1" and "0" in right hand side vector "b".
set first row&column, last row&column of assembled "A" to "0" at left hand side, then do the same thing as above.
these two methods are different, the first is more intuitive(probably preferred by finite difference user), while the second sounds more rigorous because we are setting the boundary "element".
I know these two ways may result ingenerate different results for some specific case. Could any body give some insight?