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以降で有効です。
これはGoogleを介して簡単に解決できる質問だと思っていましたが、決定的な(または推測的な)答えを見つけることができないようです。
コンパレータステートメントを使用する場合、暗黙的なキャストはどの順序で発生しますか?
int i = -1; size_t t = 1; bool result = i < t;