Results 1 to 5 of 5
  1. #1
    pranyrajesh is offline Member
    Join Date
    Jun 2012
    Posts
    2
    Rep Power
    0

    Exclamation JDBC code in Interface

    Hi All,
    Can i write JDBC connectivity properties like connection URL,Driver class,Username and password in an interface and making them as interface constants.. so that in my project all programs can use it easily and noboy can't change the property values..
    and my another doubt is, how we can better use interface constants in an effective manner in real time projects.

    Thanks in advance,
    Rajesh

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default Re: JDBC code in Interface

    Can i write JDBC connectivity properties like connection URL,Driver class,Username and password in an interface and making them as interface constants.. so that in my project all programs can use it easily and noboy can't change the property values.
    Try it and see. Although it doesn't sound like it would result in a particularly secure database.

    Also you might read 9.3. Field (Constant) Declarations in the Java Language Specification.

    how we can better use interface constants in an effective manner in real time projects.
    That's a rather general question! For a well rounded and considered answer you would be better off consulting Wikipedia or a reputable textbook then asking something specific about anything that is unclear or which you consider wrong.
    Last edited by pbrockway2; 06-27-2012 at 10:19 AM.

  3. #3
    pranyrajesh is offline Member
    Join Date
    Jun 2012
    Posts
    2
    Rep Power
    0

    Default Re: JDBC code in Interface

    Thanks for the reply..

  4. #4
    rollback is offline Member
    Join Date
    Jun 2012
    Posts
    1
    Rep Power
    0

    Default Re: JDBC code in Interface

    study english

  5. #5
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,585
    Rep Power
    12

    Default Re: JDBC code in Interface

    Quote Originally Posted by rollback View Post
    study english
    Huh?

Similar Threads

  1. JDBC code not included into JAR file??
    By friday in forum Advanced Java
    Replies: 1
    Last Post: 12-17-2010, 08:13 PM
  2. what is wrong wid this code??(interface)
    By swathi dharmaraj in forum New To Java
    Replies: 3
    Last Post: 09-07-2010, 04:25 PM
  3. Create interface from my code
    By Lyricid in forum AWT / Swing
    Replies: 1
    Last Post: 11-18-2009, 06:39 PM
  4. jdbc/ swing code problem
    By sami in forum Advanced Java
    Replies: 1
    Last Post: 08-13-2007, 03:26 PM
  5. Linking code to GUI Interface
    By ai_2007 in forum Advanced Java
    Replies: 1
    Last Post: 07-02-2007, 02:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •