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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
class Gene<T> implements GenInterface<String>, GenInterface2<Integer> { | |
/* GenInterFaceで指定している型が GenInterface2で継承したときの型と一致している場合はエラーは起きない | |
* しかし、implements時に型が一致してない場合はオーバーライドとして認められない また一度ジェネリックスで指定したあとにもう一度指定はできない | |
* | |
*/ | |
private T val1; |
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
// abstractClass.java | |
import java.io.IOException; | |
public abstract class AbstractClass { | |
public abstract void throwIOException() throws IOException; | |
} |
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
// method.java | |
class Method{ | |
public void method(long num){ | |
System.out.println("hoge"); | |
} | |
public void method(short num){ | |
System.out.println("huga"); | |
} |
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 adapter; | |
public class HTML { | |
private String string; | |
public HTML(String string) { | |
this.string = string; | |
} | |
/** |
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 iterator; | |
import java.util.ArrayList; | |
/** | |
* Userを格納するためのクラス | |
* @author kodaitakahashi | |
* | |
*/ | |
public class UserList { |
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
class Hoge | |
private | |
def hoge | |
puts 'hoge' | |
end | |
end | |
class Fuga < Hoge |
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
# apps/web/controllers/hoge/hoge.rb | |
module Web::Controllers::hoge | |
class Index | |
include Web::Action | |
expose :hoge #Viewと共有するインスタンス変数のシンボルを渡す | |
def call(params) | |
@hoge = 'Hello Hoge' # exposeに明示されているためViewに共有される。 | |
@huga = 'Hello Huga' # exposeに明示されていないためViewには共有されない。 | |
end |
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
10分以内でおねがいします。 | |
部屋は就職資料室 15704でお願いします。 | |
鍵は事務室にあります。 | |
昼は避けてください。 | |
学校名と名前をよろしくおねがいします。 | |
自己PRをお願いします。 | |
学生時代に頑張ったことはなんですか? (気になることは深掘りありです。) | |
なぜ弊社を希望されましたか? |
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
module M | |
def hoge | |
puts 'hoge' | |
end | |
end | |
class C | |
extend M | |
end |
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
module M1; end | |
module M2; end | |
class C | |
include M1 | |
prepend M2 | |
end | |
a = C.new |