TS 68 JavaFX Hints

(Difference between revisions)
(Implement all abstract methods)
Line 1: Line 1:
-
'''Author:''' <br>
+
'''Author:'''   [mailto:sunflower@netbeans.org Alexandr Scherbatiy] <br>  
-
'''Version:''' 1.1 <br>
+
'''Version:''' 1.2 <br>
-
'''Last update:''' 23 November 2009 <br>
+
'''Last update:''' 26 February 2010 <br>
'''Introduction:'''  <br>
'''Introduction:'''  <br>
'''Comments:'''  <br>
'''Comments:'''  <br>

Revision as of 12:40, 26 February 2010

Author: Alexandr Scherbatiy
Version: 1.2
Last update: 26 February 2010
Introduction:
Comments:


Contents


Implement all abstract methods

Argument with Sequence type

  • Copy the code to the editor:
         
abstract class A{
    abstract function f (seq:Boolean[]);
}

class B extends A{

}
  • Implement all abstract methods .
    • EXPECTED RESULT: Implementation of the abstract methods should be added
  
import java.lang.UnsupportedOperationException;

abstract class A{
    abstract function f (seq:Boolean[]);
}

class B extends A{
    override function f (seq : Boolean[]) : Object { 
        throw new UnsupportedOperationException('Not implemented yet');
    }
}


Generic interface

  • Copy the code to the editor:
         
import java.lang.Comparable;

class Vector extends Comparable {
}
  • Implement all abstract methods .
    • EXPECTED RESULT: Implementation of the abstract methods should be added
import java.lang.Comparable;
import java.lang.UnsupportedOperationException;

class Vector extends Comparable {
    override public function compareTo (arg) : Integer {
        throw new UnsupportedOperationException('Not implemented yet');
    }
}
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo