Rect rect1 = new Rect(0, 0, 10, 10); // create a rectangle with dimensions 10x10 Rect rect2 = new Rect(0, 0, 0, 0); // create an empty rectangle if (rect1.isEmpty()) { // this code will not execute since rect1 is not empty } if (rect2.isEmpty()) { // this code will execute, since rect2 is empty }In this example, we create two rectangles with different dimensions, and then use the `isEmpty()` method to check if each rectangle is empty. The Rect class is part of the android.graphics package.