Created
January 25, 2016 07:23
-
-
Save hiyorineko/5d08aef5f861be2c3673 to your computer and use it in GitHub Desktop.
パッケージの使い方やっとわかった
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
public class Packaged{ | |
public static void main(String[] args){ | |
com.exam.PackageTest p1 = new com.exam.PackageTest(); | |
System.out.println(p1.show()); | |
} | |
} |
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 com.exam; | |
public class PackageTest{ | |
private int i = 1000; | |
public int show(){ | |
return i; | |
} | |
} |
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
java Packaged | |
1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
newするときに両側にパスを書くといい
学びを得た