Hmm. an instance method is just a method declared without static
public int nthDigit(int n)
{
//code
}
and in main.
public static void main(String[] args)
{
BCD binary=new BCD();//create new instance of the class
int num=1;
int digit=binary.nthDigit(num);//call instance method.
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum