On Sep 7, 3:32 pm, miga <[EMAIL PROTECTED]> wrote:
> On Sep 7, 8:23 pm, Crunch <[EMAIL PROTECTED]> wrote:
>
> > On Sep 7, 1:47 pm, miga <[EMAIL PROTECTED]> wrote:
> > Ah, do you mean the exercise shows us two ways to ADD to system
> > properties:  via the txt file and via setProperty method?  If so, the
> > comments could be made clearer, maybe:
> > // set up new properties object
> >         // from file "myProperties.txt"
>
> Unless I've missed something, this is exactly what is shown in the
> lab.

You're right.  The reply was sent while I was in the middle of it.
(Sorry).

Here's what I meant to say.  ... the comments could be made clearer,
maybe:
        // set up new properties object
        FileInputStream propFile = new FileInputStream(
                "myProperties.txt");
        Properties p = new Properties(System.getProperties());

        // Add properties from file "myProperties.txt"
        FileInputStream propFile = new FileInputStream(
                "myProperties.txt");
        p.load(propFile);

>
> Besides, if you really had read the javadoc for System class, you
> would have no doubt about what the program exactly does, and even if
> you had not read the javadoc, nobody impedes you to play with the
> code, comment out some part just to see what it does, or not providing
> the text file and so on. On the contrary, it is highly recommended to
> do so.

I did play with it and didn't see any huge difference when I commented
out all the propFile code, thus the question.  And I do read all the
recommended material, it just doesn't get through sometimes so I need
more direction.  Truly, I'm not lazy, just a bit dense sometimes.  :)

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to