Dot Notation: Dot notation is used to access non-static methods by using the name of the object followed by a dot (.) and then the method name. It allows you to call specific actions on an object.
System.out.println:System.out.println is a commonly used non-static method in Java that prints text or values to the console. It is often used for debugging purposes or displaying information to users.
Static Methods:In contrast to non-static methods, static methods belong to a class itself rather than an instance of the class. They can be called directly without creating an object and cannot modify the state of an object.