You would have to make a class of it. For example:
public class Binary
{
public static String binToDec(int b)
{
return Integer.toBinaryString(b);
}
} Just import it and use it. Classes are very in depth, wikipedia has some good articles on the topic.