Created
January 30, 2015 03:33
-
-
Save ron623/51402cc10bd7622a3443 to your computer and use it in GitHub Desktop.
thisTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package stringTest; | |
/* | |
* thisを使用したインスタンス変数へのアクセス確認クラス | |
*/ | |
public class thisTest { | |
public thisTest() { | |
// TODO 自動生成されたコンストラクター・スタブ | |
} | |
// インスタンス変数 | |
String str = "インスタンス変数"; | |
public void disp(){ | |
String str = "ローカル変数"; | |
// インスタンス変数の表示 | |
System.out.println(this.str); | |
// ローカル変数の表示 | |
System.out.println(str); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment