In AX, you will see that some methods have a method modifier named static.
Actually, all the Jobs we have looked at so far have been using the static modifier. This means that the method can be called directly without creating an object. This also off course means that the static classes can't access the protected data defined in the classDeclaration of the class.
The modifier is used at the beginning of the method definition right after the method access modifier and before the return value as in the next example:
public static void main(Args args)
{
}
To call a static method you use double colon instead of period as you do in object methods:
SomeClass::staticMethod()
Actually, all the Jobs we have looked at so far have been using the static modifier. This means that the method can be called directly without creating an object. This also off course means that the static classes can't access the protected data defined in the classDeclaration of the class.
The modifier is used at the beginning of the method definition right after the method access modifier and before the return value as in the next example:
public static void main(Args args)
{
}
To call a static method you use double colon instead of period as you do in object methods:
SomeClass::staticMethod()
No comments:
Post a Comment