| containsKey() | ใช้ตรวจสอบว่ามี key ที่กำหนดอยู่ใน Properties หรือไม่ |
|---|
method:containsKey ( object_string_key );
return type:boolean
content:ใช้ตรวจสอบว่ามี key ที่กำหนดอยู่ใน Properties หรือไม่
example:Properties properties = new Properties (); properties.put ( "bamboo", "ไม้ไผ่" ); properties.put ( "lab", "ห้องปฏิบัติการ" ); properties.put ( "code", "รหัส" ); if ( properties.containsKey ( "bamboo" ) ) { System.out.println ( "bamboo is in Properties." ); }