Explain about the static classes, JAVA Programming

Assignment Help:

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.

 


Related Discussions:- Explain about the static classes

What do you understand by the term constructor in java, Question: (a) ...

Question: (a) What are the main differences between an object and a class? Illustrate with appropriate examples. (b) Differentiate between a global variable and a local va

Define the difference between stringbuffer and string class, Define the dif...

Define the difference between StringBuffer and String class ?

Determine about the wrapper classes, Determine about the Wrapper Classes ...

Determine about the Wrapper Classes Every primitive data type has a corresponding object (wrapper class). These wrapper classes provides extra functionality (conversion, size c

RatinalAssignment, 1. Make a class Rational to provide at least following m...

1. Make a class Rational to provide at least following methos and constructors: Rational r1= new Rational (3,5); Rational r2= new Rational (4,7); Rational r3=r1.add(r2);

Need remote synchronization tool for folders and files, Need Remote Synchro...

Need Remote Synchronization tool for folders and files? Project Description:                 We want a tool to synchronize the content of one or more folders on the file syst

Explain subclasses and polymorphism, Explain Subclasses and Polymorphism ? ...

Explain Subclasses and Polymorphism ? Car and Motorcycle are subclasses of MotorVehicle. If you instantiate a Car or a Motorcycle along with new, you can use in which object a

Digital clock, how to Using polymorphism to write a program to display digi...

how to Using polymorphism to write a program to display digital clock?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd