• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to display elements Properties class

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<code>
writeProp = getDataFromCalc(rec);

for(int i=0;i<writeProp.size();i++)
{
System.out.println("Satyajit for Part7Sectionc3====="+writeProp.keys());
}
System.out.println("Satyajit for Part7Sectionc3====="+writeProp.getProperty("Part7SectionC3"));

</code>

Output:
Satyajit for Part7Sectionc3=====java.util.Hashtable$Enumerator@1f541ef
Satyajit for Part7Sectionc3=====java.util.Hashtable$Enumerator@bbef70
Satyajit for Part7Sectionc3=====true


I want to display keys with their correspomding values.
 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use propertyNames of Properties class to get all properties names, and iterate every name to get property value.

Reference Java doc of Properties class for help. You will find the answer better than mine.
 
reply
    Bookmark Topic Watch Topic
  • New Topic