native methods in Java are methods declared in a Java class but implemented in a native language like C or C++ using the Java Native Interface (JNI).
They are used when Java code needs to interact with hardware, operating system, or performance-critical operations that Java cannot handle efficiently.
The native keyword is used to declare such methods, and they are typically loaded from a shared library (e.g., .dll on Windows or .so on Unix).