SarkariResultess QA Bank

Dart class कैसे define करते हैं? का working code example क्या है?

Other 0 Views Verified
Dart class कैसे define करते हैं? का working code example क्या है? सही उत्तर: class User { String name; User(this.name); } व्याख्या: class User { String name; User(this.name); } यह इस प्रश्न के संदर्भ में सही उत्तर है। Flutter/Dart development में concept को समझने के साथ उसके lifecycle, constraints, error handling और practical usage को भी ध्यान में रखना चाहिए. Developer note: Dart class कैसे define करते हैं?
Sarkari Result QA Bank
Editorially reviewed exam information

Answer & Explanation

4 Answers
Verified

struct User()

struct User()
Additional Explanation
यह विकल्प सही नहीं है। इस प्रश्न के संदर्भ में सही उत्तर है: class User { String name; User(this.name); }
Verified

object User {}

object User {}
Additional Explanation
यह विकल्प सही नहीं है। इस प्रश्न के संदर्भ में सही उत्तर है: class User { String name; User(this.name); }
Verified

define class User()

define class User()
Additional Explanation
यह विकल्प सही नहीं है। इस प्रश्न के संदर्भ में सही उत्तर है: class User { String name; User(this.name); }
Verified Correct Answer

class User { String name; User(this.name); }

class User { String name; User(this.name); }
Additional Explanation
यह सही उत्तर है। class User { String name; User(this.name); }