Dbcollection Dbcon = null;
DBObject query = new basicdbobject ();
Basicdblist values = new basicdblist ();
//or How to use --->> Check Salary salary<3000 or salary>10000
Values.add (new basicdbobject ("Salary", new basicdbobject ("$GT", 10000));
Values.add (new basicdbobject ("Salary", new basicdbobject ("$lt", 3000));
Query.put ("$or", values);
Dbcursor dbcursor = Dbcon. Find (query);
//end///
// Enquiry salary>1000 or age<22
Values.add (new basicdbobject ("Salary", new basicdbobject ("$GT", 10000));
Values.add (new Basicdbobject ("Age", new basicdbobject ("$lte", 22));
Query.put ("$or", values);
Dbcursor DbCursor2 = dbcon.find (query);
//end///
// in How to use --->> Enquiry salary in [+]
Values.add (3000);
Values.add (10000);
Query.put ("salary", new basicdbobject ("$in", values));
Dbcursor DbCursor3 = dbcon.find (query);
//and How to use --->> salary>10000 and age<22
Query.put ("salary", new basicdbobject ("$GT", 10000));
Query.put ("Age", new basicdbobject ("$lt", 22));
dbcursor dbCursor4 = dbcon.find (query);