0
点赞
收藏
分享

微信扫一扫

JavapToolTest.main(strarry);


public class JavapToolTest
{
	//定义count实例变量,并为之指定初始值
	int count = 20;
	{
		//初始化快中为count实例变量指定初始值
		count = 12;
	}
	//定义两个构造器
	public JavapToolTest()
	{
		System.out.println(count);
	}
	public JavapToolTest(String name)
	{
		System.out.println(name);
	}
	//*
	public static void main(String[] args) 
	{
		JavapToolTest cat = new JavapToolTest("kitty" );
		//System.out.println(cat);
		JavapToolTest c2 = new JavapToolTest();
		//System.out.println(c2);
	}
	//*/

}

class  TestJavapToolTest
{

	public static void main(String[] args) 
	{
		/*
		JavapToolTest cat = new JavapToolTest("kitty" );
		//System.out.println(cat);
		JavapToolTest c2 = new JavapToolTest();
		//System.out.println(c2);
		*/
		String[] strarry=null;
		JavapToolTest.main(strarry);
	}

}




举报

相关推荐

0 条评论