Check the Java Language Spec... there no such thing as a "Bitwise unary NOT operator". There is bitwise complement operator, just like the previous poster already said.

ps You can also exclusive OR with a value of all 1 bits.

Edited
by JamesCherrill: Fixed UK spelling for bitwize (Thanks Tux) ;)

In Java ints are represented using 32 bits, so 15 is represented as 0000 0000 0000 0000 0000 0000 0000 1111, and the complement of that is 1111 1111 1111 1111 1111 1111 1111 0000

It's a bit difficult to explain why -16 is 1111 1111 1111 1111 1111 1111 1111 0000, but that is what it is. Perhaps it will help if you know that -1 is 1111 1111 1111 1111 1111 1111 1111 1111 and then you do -1 + -1 to get 1111 1111 1111 1111 1111 1111 1111 1110 which is -2, and you can keep on going until you get to -16. Try it and see.

Even though it looks like zero value is in the middle between positive and negative because the opposite of all-zero-bit is all-one-bit, it is not. Because 0 is (somewhat) being included in the positive side, there are 2^31 positive integer (0 up to (2^31)-1) and 2^31 negative integer (-1 up to -2^31) numbers. The first bit of the 32-bit is the sign bit.

Now, when you flip bits, it is not going to be exact as you think -- the flipped bit value of 15 is not -15. Below is value pairs from flipping bits. You can see that the pair is not perfectly matched to its own number but is off by 1.

public class StudentListings{
private String name; // key field
private int ID;
private double GPA;
private int next;
private int size;
private StudentListing[] data;
public StudentListings(){
this.name= name;
this.id= ID;
this.gpa=GPA;
}
public StudentListings(){
next=0;
data= new StudentListings[Size];
size= Size;
} // end of constructor
...

I'm currently developing a webpage that when user input the data needed in Advance Filtering and click on the button'Search Result',the table will show the data needed,but the problem is ...