Results 1 to 4 of 4

Thread: Initialising an object with a string parameter

Threaded View

  1. #1
    Join Date
    May 2006
    Posts
    5

    Default Initialising an object with a string parameter

    Hi,

    I have a Constants interface with various Strings like home directory ,lib directory etc information placed in variables like

    public interface ConstantsIF {
    public static final String HOME="C:/";
    }


    one other class file works like this

    DependentClass {
    public DependentClass(String x) {
    // do some thing with x here
    }
    }

    if my x has to be a value like

    ConstantsIF.HOME+"/config/config.xml";

    then how do I pass that in the
    <constructor-arg type="java.lang.String">
    <value>??????????????</value>
    </constructor-arg>



    Can somebody help me with this please

    Regards,
    Chetan
    Last edited by chetan; May 31st, 2006 at 09:12 AM.

Posting Permissions

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