Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2つの行に違いはありますか?
SomeClassOrInterface<Type1> name = new SomeClass<Type1>(); SomeClassOrInterface<Type1> name = new SomeClass<>();
2番目の構文はJava7でのみ有効ですが、前者はJava5以降で有効です。