Skip to main content

Posts

Showing posts from January, 2014

What is Static Member?

Static member is a member that belongs to the class and not to the objects of the class. Static members are specified using the keyword static. The three valid static members of a class are static constructor, static variable and static method.

Static Variables:
When a variable or attribute of a class is declared as static then it is called as Static Variable. Only one copy of static variable will be stored in the memory. All the objects of the class will be accessing the same copy of it.

Static Methods:
Static methods are the methods which are marked as static. Static method can access only static members of a class. Static methods cannot access non-static or instance members of a class.

Static Constructors:
Static constructors are special type of constructors that are called when the class is loaded for the first time. Static constructors are used to initialize static variables of a class.

What is a Constructor in Object Oriented Programming?

Constructor is specialized method that is contained in a class. Constructor will be triggered automatically when an object is created. Purpose of the Constructors is to initialize an object of a class.

Constructor’s name is identical to the Class name. Constructors can take parameters but constructors have no return type. This is because; constructors return an object by itself.

Static Constructor
When a constructor of a class is marked with static modifier, then the constructor is called static constructor. Unlike other constructors, Static constructor cannot be triggered while creating instances of that class.

Static constructors will be automatically triggered when the class is loaded for the first time. Static constructors are used to initialize values for the static variables of that class.

Google Glass prescription frames, shades are coming

Google Glass is getting glasses. Google is adding prescription frames and new styles of detachable sunglasses to its computerized, internet-connected goggles known as Glass. The move comes as Google Inc. prepares to make Glass available to the general population later this year. Currently, Glass is available only to the tens of thousands of people who are testing and creating apps for it. Glass hasn't actually had glasses in its frame until now. read more from ........