
class Nov8 {
	public static void main(String[] args) {

		Cat c = new Cat("Tom");
		System.out.println(c);
		System.out.println(c.getName());

		// ! operator - Logical NOT
		boolean flag = !true;
		System.out.printf("%b\n", flag);

		flag = c instanceof Cat;
		System.out.printf("%b\n", flag);

		Cat d = new Cat("Garfield");

		if(c == d) {
			System.out.println("equal cats");
		}
		else {
			System.out.println("not equal cats");
		}

		flag = c instanceof Object;
		System.out.printf("c instanceof Object: %b\n", flag);

		Object ref = c;

		if (c.equals(d)) {
			System.out.println("cats are equal");
		}
		else {
			System.out.println("cats not equal");
		}

	}
}
