explain about the static classesa class


Explain about the Static classes

A  class  can  have  static  variables    and    methods.    Static    methods    and    variables    are  associated  with  class  itself  and  are n't  tied  to  any  specific object.  Hence statics  can  be  accessed without  instantiating  an object.  Static  methods  and  variables  are usually accessed by class name.

The most  significant aspect  of  statics  is  that  they  take place as    a    single    copy    in    class  regardless  of  the number of objects. Statics are shared by every object of a class. Non static methods and  instance variables aren't accessible inside a static method since no this reference is available inside a static method.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: explain about the static classesa class
Reference No:- TGS0356465

Expected delivery within 24 Hours