java练习

2019年2月14日23:50:51 发表评论 1,019 views
/**
 * Created by xabcd on 2019/2/14.
 */
public class pracclass
{
    String name="张三";
    int age=20;
    String like="吃";
    public pracclass(String a,int b,String c)
    {
        name = a;
        age = b;
        like = c;

    }
    void talk()
    {System.out.println(name+age+like);}


    public static void main(String args[])
    {
        pracclass p = new pracclass("王五",44,"编程");
                p.talk();
    }

}

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: