/** * 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(); } }