Question about API listed "Field Summary" items

Discussion in 'Java' started by icmrn@netscape.net, Sep 23, 2005.

  1. Guest

    When you look in the API at a class or interface, before the methods
    comes a section called "Field Summary". I dont understand what these
    are for.

    In the interface ResultSet, there is one called TYPE_FORWARD_ONLY.
    Does this mean that any ResultSet object has a field called
    TYPE_FORWARD_ONLY ? Can I set it ? The field is static and returns an
    int. An int ? wouldnt it seem more reasonable boolean ?

    If you can give me a hint about this, I'd be grateful, but even better
    would be if you can point me to something that explains what these
    "Field Summary" items are about and how to use them.
     
    , Sep 23, 2005
    #1
    1. Advertising

  2. Roedy Green Guest

    On 23 Sep 2005 07:48:15 -0700, wrote or quoted :

    >When you look in the API at a class or interface, before the methods
    >comes a section called "Field Summary". I dont understand what these
    >are for.


    these are just he members of the class -- variables and constants.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 23, 2005
    #2
    1. Advertising

  3. Roedy Green Guest

    On 23 Sep 2005 07:48:15 -0700, wrote or quoted :

    >In the interface ResultSet, there is one called TYPE_FORWARD_ONLY.
    >Does this mean that any ResultSet object has a field called
    >TYPE_FORWARD_ONLY ? Can I set it ? The field is static and returns an
    >int. An int ? wouldnt it seem more reasonable boolean ?


    Don't be afraid to peek at Sun's code with an IDE. It lives in src.zip

    /**
    * The constant indicating the type for a <code>ResultSet</code>
    object
    * whose cursor may move only forward.
    * @since 1.2
    */
    int TYPE_FORWARD_ONLY = 1003;

    ....
    * @return <code>ResultSet.TYPE_FORWARD_ONLY</code>,
    * <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>,
    * or <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
    * @exception SQLException if a database access error occurs
    * @since 1.2
    */
    int getType() throws SQLException;



    These are CONSTANTS representing an enum in the days before enums.

    You will typically see these constants being used as parameters or
    returned from methods, or rarely that you can use to set some variable
    directly or make sense of some other variable''s coding int value..
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 23, 2005
    #3
  4. Roedy Green Guest

    On Fri, 23 Sep 2005 17:15:26 GMT, Roedy Green
    <> wrote or quoted :

    > /**
    > * The constant indicating the type for a <code>ResultSet</code>
    >object
    > * whose cursor may move only forward.
    > * @since 1.2
    > */
    > int TYPE_FORWARD_ONLY = 1003;


    this is inside an interface so you have an implied static final.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 23, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cowboy \(Gregory A. Beamer\) [MVP]

    Need to get my site listed with search engines, where do I start?

    Cowboy \(Gregory A. Beamer\) [MVP], Jun 8, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    335
    Charlie@CBFC
    Jun 8, 2004
  2. Neo

    assembly isn't listed

    Neo, Sep 14, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    427
    William F. Robertson, Jr.
    Sep 14, 2004
  3. Stu
    Replies:
    0
    Views:
    428
  4. fripper
    Replies:
    5
    Views:
    1,142
    Juan T. Llibre
    Oct 28, 2005
  5. Christian Seberino
    Replies:
    5
    Views:
    842
    Christian Seberino
    Oct 9, 2003
Loading...

Share This Page