package com.zwk.oop;
public class newDemo {
public static void main(String[] args) {
test01();;
test02();
test03();
}
/**
* set方式
*/
public static void test01(){
int time = 1000000000;
long startTime = System.currentTimeMillis();
for (int i = 0; i < time; i++) {
User user = new User();
user.setName("张三");
java 用new语句创建对象的三种方法
最新推荐文章于 2024-05-15 16:16:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)