English

If the name of the class is "Yellow", what can be the possible name for its constructors?

Advertisements
Advertisements

Question

If the name of the class is "Yellow", what can be the possible name for its constructors?

Options

  • yellow

  • YELLOW

  • Yell

  • Yellow

MCQ
Advertisements

Solution

Yellow

Explanation:

The constructor will have the same name as the class itself.

shaalaa.com
  Is there an error in this question or solution?
2023-2024 (March) Official
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×