O'Reilly logo

Borland® JBuilder™ Developer’s Guide by Jeff Swisher, Saleem Siddiqui, Michael Landy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

In Practice

This lab focuses on reading key pairs from a file. The file will be used to hold configuration settings for the current user.

You will enhance a class named ConfigFile based on the following requirements:

  • The Properties class found in the java.Util package will be used to set properties, get properties, load properties, and restore properties.

  • The Properties class contains methods that will read and write the properties to a stream.

  • If the configuration file does not exist, create it.

  • If the configuration file does exist, load in the key pairs.

  • Implement methods to read a property, set a property, and save a property.

  • Allow the configuration file to be passed in the constructor of the class.

Step 1: Opening the Example and Reviewing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required