php mcq questions with answers


                                
The code public class B : A { }
A. Defines a class that inherits all the methods of A
B. Defines a class that inherits the public and protected methods of A only
C. Errors
D. a and b
                                
Assuming that public class B : A { public B(int i) :base(i) { } } compiles and runs correctly, what can we conclude about the constructors in the class A?
A. One constructor takes an argument of type i
B. There is only a default constructor
C. One constructor takes an arguments of the type int
D. False
                                
Classes declared with the sealed keyword cannot be base class.
A. True
B. False
                                
A method_____an exception when that method detects that a problem has occured.
A. Trys
B. Catches
C. Throws
D. a and b
                                
Exception objects are derived from the class.
A. Try
B. Catch
C. Exception
D. Event
E. System