10:43 am - Thursday January 19, 2017

propertiesExample Program for setProperty(string key,string value)

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044

/**
@author:candidjava.com
@description:PropertiesExample Program for setProperty(String key,String value)
*/
import java.util.Properties;

public class SetProperty {
public static void main(String args[]) {
Properties prop = new Properties();
prop.setProperty("chennai", "tamilnadu");
prop.setProperty("mumbai", "maharastha");
prop.setProperty("hyderabet", "anthra");
prop.setProperty("bangalore", "karnadaka");
System.out.println("the properties is:" + prop);
}
}


Output
the properties is:{bangalore=karnadaka,chennai=tamilnadu,mumbai=maharastha,hyderabad=anthra}

Filed in: Z-A All Java Codes

Comments are closed.