OOPs Interview Question and Answers

46. What are the operators that are not overloaded?
 
  • Assignment +=, -=,*=, %=, /=
  • Conditional &&, ||
  • Other (), =, ?, ?:, ->,new, size of, is, as, type of.
 
Your Name Your Email-ID
Your Answer
47. What is the difference between System.String and System.Text.String Builder classes?
 
  • System.String is immutable.
  • System.String Builder was designed with the purpose of having a mutable String where a variety of operations can be performed.
 
Your Name Your Email-ID
Your Answer
48. What are the features of the constructor?
 
  • The constructor may be static or non static.
  • The name of the constructor is the class name itself.
  • The constructor does not return any value and hence does not have a return type.
  • The formal parameters define the signature of the constructor.
 
Your Name Your Email-ID
Your Answer
49. What are the features of destructor?
 
  • The name of the destructor is same as the class name.
  • The name is preceded by ~ (tilde).
  • Destructors always public.
  • There are no Parameters in the signature.
  • There is no return Type in the destructor.
 
Your Name Your Email-ID
Your Answer
50. What is the difference between sealed class and sealed methods?
 
  • A class that cannot be sub classed is called a sealed class.
  • It is achieved by using the keyword sealed.
  • When an instance method declaration includes the sealed modifier, the method is said to be a sealed method.
  • It means a derived class cannot override this method.
 
Your Name Your Email-ID
Your Answer
123456789101112 Page 10 of 12