首页 > 其他分享 >Test610

Test610

时间:2024-09-23 14:21:40浏览次数:10  
标签:like age name Person3 Test610 public String


package com.shrimpking.t5;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Shrimpking
 * @create 2024/9/15 21:05
 */
class Person3{
    String name;
    int age;
    String like;

    public Person3(String name,int age,String like){
        this.name = name;
        this.age = age;
        this.like = like;
    }

    @Override
    public String toString()
    {
        return "Person3{" + "name='" + name + '\'' + ", age=" + age + ", like='" + like + '\'' + '}';
    }
}

public class Test610
{
    public static void main(String[] args)
    {
        Person3 p1 = new Person3("zhang",19,"swimming");
        System.out.println(p1);
    }
}

标签:like,age,name,Person3,Test610,public,String
From: https://blog.51cto.com/u_15356972/12089181

相关文章