Results 1 to 2 of 2
  1. #1
    Ancalime is offline Member
    Join Date
    Jul 2008
    Location
    England
    Posts
    2
    Rep Power
    0

    Default information used in other class

    Hi, do you know of any method which would allow for one class to make use of information in another class, in this situation I have one class called department which is able to connect to Mysql and I would like one row of information within this, called id, to be accessed and used in another class, called department table.
    I would be grateful for any help given.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,394
    Rep Power
    25

    Default

    Two ways for class A to get/see info in class B.
    Define the fields in A as public
    or(Better) have accessor (get....) methods in A that B can call to return the desired info.

Similar Threads

  1. Getting class field information using Reflection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-24-2008, 03:20 PM
  2. system information
    By nitinborge5 in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 09:25 AM
  3. Information about Struts
    By Felissa in forum Web Frameworks
    Replies: 2
    Last Post: 07-02-2007, 04:40 PM
  4. Some information about Hibernate
    By Marcus in forum JDBC
    Replies: 2
    Last Post: 07-02-2007, 04:26 PM
  5. Some information about spring
    By Albert in forum Web Frameworks
    Replies: 2
    Last Post: 07-02-2007, 04:08 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
  •