Dart

Dart

Dart is Google’s client-optimized, object-oriented programming language designed for fast apps on any platform. It is the powerhouse behind the Flutter framework,


  1. What is the entry point of every Dart application?

    • start()
    • init()
    • main()
    • run()
  2. Which keyword is used to declare a compile-time constant?

    • final
    • const
    • static
    • fixed
  3. How do you perform string interpolation in Dart?

    • {var}
    • #var
    • $var
    • @var
  4. Which data type is used for whole numbers in Dart?

    • float
    • double
    • int
    • num
  5. What does '?' mean when added to a type (e.g., String?)?

    • It's a secret
    • The variable can be null
    • It's a dynamic type
    • It's a constant
  6. Which keyword is used to inherit a class?

    • implements
    • extends
    • with
    • inherits
  7. What is a Mixin?

    • A type of constructor
    • A way to reuse code in multiple classes
    • A private variable
    • A data type
  8. Which keyword allows a variable to be initialized later?

    • late
    • future
    • async
    • await
  9. What is the purpose of an Abstract Class?

    • To be instantiated
    • To define an interface for others
    • To hide data
    • To speed up the app
  10. Which keyword is used to handle exceptions?

    • try-catch
    • error-handle
    • fail-safe
    • attempt
  11. What is a Dart Isolate?

    • A UI component
    • An independent worker with its own memory
    • A network socket
    • A CSS style
  12. How do Isolates communicate?

    • Shared memory
    • Message passing
    • Global variables
    • Static methods
  13. What is a StreamController used for?

    • Controlling UI
    • Creating and managing a stream
    • Sorting lists
    • Handling HTTP
  14. What is Dart FFI?

    • Fast File Interface
    • Foreign Function Interface (C/C++ integration)
    • Flutter Fast Install
    • Full File Integration
  15. Which constructor creates a single instance only?

    • Singleton/Factory
    • Default
    • Named
    • Const