stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Bootcamp quiz Flashcards | StudBud
Explore
/
Bootcamp quiz
How do you define a constructor in Dart?
What does git status do?
Bootcamp quiz
21 terms
·
StudBud Administration
·
21 plays
Imported from external platform
Flashcards
21 cards
F
Practice quiz
P
Host live
L
Questions
21
Answers
1
What does git status do?
Pulls updates
Displays current branch and file changes
Shows branch history
Deletes files
2
How do you define a constructor in Dart?
MyClass() {}
new MyClass() {}
constructor MyClass() {}
def MyClass() {}
3
What is the primary benefit of Dart’s JIT compilation during Flutter development?
Hot reload and faster iteration
Stronger type safety
Native performance
Smaller app size
4
Which keyword is used for conditional branching in Dart?
for
loop
if
return
5
How do you define an anonymous function in Dart?
() => {}
function() {}
() {}
func => {}
6
Which statement best describes how Dart executes code?
Dart can be both compiled ahead-of-time (AOT) and just-in-time (JIT).
Dart uses a virtual machine like Python.
Dart is always compiled to native machine code before execution.
Dart is only interpreted like JavaScript.
7
What does ?? operator do in Dart?
Checks type
Compares null
Throws error
Null-aware assignment
8
What is Dart primarily used for?
Web and mobile development
System programming
Game development
Machine learning
9
Which operator is used to check equality in Dart
equals()
!=
==
=
10
What is the output of this code?var list = [1, 2, 3];print(list[1]);
3
2
1
Error
11
Which command creates a local Git repository?
git repo
git start
git init
git create
12
Which statement is used to exit a loop early in Dart?
exit
return
break
stop
13
What does this code do? String? name; print(name ?? "Guest");
Prints null
Prints "name"
Throws error
Prints "Guest"
14
How can you add an item to a list in Dart?
list.insert(item);
append(item, list);
list.add(item);
list += item;
15
Which of these is a valid Dart collection?
Array
SetList
List
Vector
16
Which keyword is used for inheritance in Dart?
implements
extends
with
inherits
17
What is the output of this code?
int a = 5;int b = a++;print(b);
6
error
5
0
18
Which of the following is a valid way to declare a variable in Dart?
x = 5 int;
int x := 5;
var x = 5;
let x = 5;
19
Which of the following is a comparison operator?
++
!
<=
--
20
What’s the correct way to check if a key exists in a map?
map.keyExists(Key)
'a' in map
map.hasKey('a')
map.containsKey(Key)
21
What is the primary purpose of a class in Dart?
To store data in key-value pairs
To loop through data
To create objects and define their structure
To define functions only