DEV Community

Awaisoop
Awaisoop

Posted on

Dart Variable And DataTypes

Dart provide us various built in data types in Dart.

Numbers
int
double
As contrast to Java or C++ Dart does not have anything like float or long. Dart offers just two types of number *Int and *Double.

Strings
Booleans
Lists
Maps
Runes
Symbols
====================================== Code ================================
void main() {

String fName = 'Awais';
var lName='Rehman'; // It is inferred as String automatically

int taxNo=123456;
var houseNo=405; // It is inferred as int automatically

bool isEmployed =true;
var isWorking = true; // It is inferred as String automatically

print(fName);
print(lName);
print(taxNo);
print(houseNo);
print(isEmployed);
print(isWorking);

}

Top comments (0)