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