fork(2) download
  1. public class Main {
  2.  
  3. static class GenericElement {
  4. public <VALUE> VALUE getValue() {
  5. return (VALUE)"Hola";
  6. }
  7. }
  8.  
  9. public static void main(String[] args) {
  10. String value = String.valueOf(new GenericElement().getValue());
  11. System.out.println("value: " + value);
  12. }
  13. }
Runtime error #stdin #stdout #stderr 0.04s 711168KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to [C
	at Main.main(Main.java:10)