Monday, 7 February 2011

PHP Interview Questions and answers

What is the use of “Final class” and can a final class be an abstract? The “Final” keyword is used to make the class uninheritable. So the class or it’s methods can not be overridden. 1final class Class1 { 2    // ... 3} 4  5class FatalClass extends Class1 { 6    // ... 7} 8  9$out= new FatalClass(); An Abstract class will never be a final class as an abstract class must be extendable. Explain abstract class and its behaviour?Abstract class is defined as a solitary entity, so other classes can inherit from it. An abstract  class can not be instantiated, only the subclasses of it can have instances. Following is one of the best examples to explain the use of an abstract class and the behavior of it. 01class...

Search here for "Freshers Jobs"