fork download
  1. class Foo {
  2. public Foo(int value) {
  3. //
  4. }
  5. }
  6.  
  7. class Bar extends Foo {
  8. public Bar() {
  9. super(ohMyValue());
  10. }
  11.  
  12. public int ohMyValue() {
  13. return 5;
  14. }
  15. }
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:9: error: cannot reference this before supertype constructor has been called
		super(ohMyValue());
		      ^
1 error
stdout
Standard output is empty