You should use the return statement to return a string value from your method.
Let me know if this works. I didn't compile or test this code.
public static String decToBin(int decimal, String str)
{
str += decimal % 2;
decimal /= 2;
if (decimal == 0)
return new StringBuffer(str).reverse().toString();
else
return decToBin(decimal, str);
}