123456789101112131415161718192021 |
- package com.lovecoding.J20250518;
- /**
- * @author WanJl
- * @version 1.0
- * @title Demo04
- * @description
- * @create 2025/5/18
- */
- public class Demo04 {
- public static void main(String[] args) {
- //引用数据类型的创建和实例化格式
- //创建引用类型变量
- //引用数据类型 变量名(对象名)=null;
- String s1;
- //实例化对象
- s1=new String("张三");
- String s2=new String("张三");
- }
- }
|