一个关于java诡异的问题,这个程序编译没有错为什么没有任何输出值?
publicclassgouzao{publicstaticvoidmain(String[]args){Personp1=newPerson(12,"小明");}}cl...
public class gouzao
{ public static void main(String []args){
Person p1=new Person(12,"小明");
}
}
class Person
{
int age;
String name;
public Person(int age,String name)
{
age=age;
name=name;
}
} 展开
{ public static void main(String []args){
Person p1=new Person(12,"小明");
}
}
class Person
{
int age;
String name;
public Person(int age,String name)
{
age=age;
name=name;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询