在线编辑器工具dotpad
基本语法接触
void main() { // this is my code. print("hello beibei,\nwelcome to our home."); // String name = "ZhangBeibei"; var name = "ZhangBeibei"; print(name); int num1 = 10; double num2 = 20; bool condition = true; print(num1); print(num2); print(condition); String car; // car = "Toyota"; print(car); // String type 格式(三双引号,多行字符串) String st1 = "this is single line"; String st2 = '''that is not single line, it can be three line or four line or more line.'''; String st3 = """this is a muiltline测试多行字符串"""; String st4 = "测试拼接 concatenation"; print(st1); print(st2); print(st3 + "同时" + st4); // 字符串的另外的使用方式 print("${st3}同时$st4"); }