class Test{ public static void main(String[] args){ // static でないメソッド xxx() は // static なメソッドである mainメソッド から // 使用できないためエラー。 xxx(); } private void xxx(){ System.out.println("staticでないメソッド"); } }