University of Cincinnati logo and link  
Properties of Beans
 
  UC ingot Properties make beans easily editable in an IDE. 
 
  • If we use the get and set naming conventions, users can set bean properties in the Property Inspector of the IDE.

  • The setter method:
    public void setSampleProperty (String value)
    will set the String property sampleProperty to the value we pass in as databaseName.
    • Note the capitalization.  The property starts with a lowercase letter, while the method starts with "set", and then the property name starting with a capital letter.  This is important.
  • The getter method:

  • public String getSampleProperty ();
    will return a String sampleProperty object.
  • Question:  How could we apply this to a database connection?
 Simple Properties