You need to sign in to do that
Don't have an account?
srinivas anantharam
how to execute static method
please tell me how to call sayYou method in bellow class?
public class HelloWorld{
public static void sayYou(){
system.debug('You');
}
public void sayMe(){
system.debug('Me');
}
}
public class HelloWorld{
public static void sayYou(){
system.debug('You');
}
public void sayMe(){
system.debug('Me');
}
}
You may execute above statment anonymously in Developer Console or Workbench to call your static method.
All Answers
In the constructor you can write, sayYou() like:
public HelloWorld()
{
sayYou();
}
You may execute above statment anonymously in Developer Console or Workbench to call your static method.