I have a function in a class, which just masks the input card number. I have made it synchronized
because, i do not want more than one thread calling my maskcard function simultaneously. My question is, should i make this function static
to be more efficient and clean? Now, where ever i am calling my maskcard function, i am calling on an instance.
public class CardMasker {
public synchronized String maskCardNumber(String cardNumber)
{
..
..
}
}