fork download
  1. import java.util.ArrayList;
  2.  
  3. class Example {
  4. public static void main(String[] args) {
  5. // No ArrayList constructor has String as a parameter.
  6. ArrayList<Object> example = new ArrayList<>("ABC");
  7. }
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:6: error: cannot infer type arguments for ArrayList<>
		ArrayList<Object> example = new ArrayList<>("ABC");
		                            ^
1 error
stdout
Standard output is empty