How to call a same function inside that function in unity?

I want to call the same function inside a function like
*
String a = null;

public void call()
{

if(a == null){

call();
}

}
*

can I call function in unity like this?

Yes and No. There is one question if you can call it like this, there is another quesiton if this will crash your game. In general the term you want to search for is called recursion.

If you have to code like it is now, then you will get a stack-overflow as the function will endlessly call itself as a never changes.

You basically have to make sure that you have an exit condition for your recursive function:

 public void call(int i) {
     i=i+1;
     if(i < 100) {
            call(i);
     }
 }

this for example would call itself until i reaches 100.