Question 51Asked in UGC NET Computer Science, August 2016 (Paper II & III, Selected Questions)

Constructors have _______ return type.

  1. Avoid
  2. Bchar
  3. Cint
  4. Dno
Show answerHide answer

Correct answer: (D) no

Explanation

A constructor resembles an instance method, but it differs from a method since it has no explicit return type, it is not implicitly inherited and it usually has different rules for scope modifiers.

From UGC NET Computer Science PYQ, August 2016 (Paper II & III, Selected Questions)

This is question 51 of UGC NET Computer Science PYQ, August 2016 (Paper II & III, Selected Questions). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.