0xCAFEBABE
0xCAFEBABE is the magic number at the beginning of Java class files. It consists of four bytes: CA FE BA BE, which, when read as a 32-bit big-endian unsigned integer, equals 0xCAFEBABE. This header identifies the file as a Java class file and helps detect misformatted or incompatible data. After this header, the file specifies minor_version and major_version, followed by the constant pool and the remainder of the class data.
In practice, the Java Virtual Machine and class loaders read the magic number early in the parsing
Originating with early versions of Java, CAFEBABE has become a well-known symbol in the Java ecosystem. The
Because it functions as a header, 0xCAFEBABE helps tooling distinguish class files from other binary formats
See also: Java class file format, magic number, class loader, JVM.