Answers for "define static keyword in java"

1

static keyword in java

// example on static class in java.
import java.util.*;
public class OuterClass
{
   // static class
   static class NestedClass
   {
      public void show()
      {
         System.out.println("in static class");
      }
   }
   public static void main(String args[])
   {
      OuterClass.NestedClass obj = new OuterClass.NestedClass();
      obj.show();
   }
}
Posted by: Guest on November-21-2020

Code answers related to "define static keyword in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language