Skip to content

Instantly share code, notes, and snippets.

@hiyorineko
Created January 25, 2016 07:23
Show Gist options
  • Save hiyorineko/5d08aef5f861be2c3673 to your computer and use it in GitHub Desktop.
Save hiyorineko/5d08aef5f861be2c3673 to your computer and use it in GitHub Desktop.
パッケージの使い方やっとわかった
public class Packaged{
public static void main(String[] args){
com.exam.PackageTest p1 = new com.exam.PackageTest();
System.out.println(p1.show());
}
}
package com.exam;
public class PackageTest{
private int i = 1000;
public int show(){
return i;
}
}
java Packaged
1000
@hiyorineko
Copy link
Author

newするときに両側にパスを書くといい
学びを得た

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment