Posts

Showing posts with the label STATIC NON STATIC KEYWORDS DIFFERENCE
                     JAVA STATIC FUNCTIONS     Ø What are static function ? Static methods are the methods which are declare in static keyword these methods are not dependent on objects i.e., they are called directly in a class. // Java program to call a static method     class GFG {         // static method     public static int sum(int a, int b)     {         return a + b;     } }     class Main {     public static void main(String[] args)     {         int n = 3, m = 6;              // call the static method          int s = GFG.sum(n, m); ...