⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 simpleclassdemo9.java

📁 JAVA程序设计课程中各章节的程序实例。
💻 JAVA
字号:
/**
*A demonstration program on this keyword
* it's a simple but classic program
*2005.1.10. xhcprince
*/

public class simpleClassDemo9
{
	private int a = 66;
	
	public void show(int a)
	{
		System.out.println(this.a);	//refers the class level 'a' !
		System.out.println(a);	    //refers function level variable !
	}

	public static void main(String args[])
	{
		simpleClassDemo9 obj = new simpleClassDemo9();
	
		obj.show(3);
	}
}
/**
*The output are as follows:
* 66
* 3
*Important tips on this() and super()
* 1.Calling super() and this() should be in the first statement inside the constructor
* 2.Yuo cannot use super() and this() int the same constructor
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -