隐式创建 var arr=["Audi","BMW","Volvo"]; 直接实例化 var arr=new Array("Audi","BMW","Volvo"); 创建数组并给数组元素赋值 var arr=new Array(); arr[0]="Audi"; arr[1]="BMW"; arr[2]="Volvo"; 注意…
1. 创建线程的三种方法及其区别 1.1 继承Thread类 首先,定义Thread类的子类并重写run()方法: package com.zwwhnly.springbootaction.javabase.thread; public class MyFirstThread extends Thread { @Override public void run() { for (int i = 0; i < 5; i++) { System.out.printf("[MyFirstThre…