Java有BufferOverflow吗?

Since Java Strings are based on char arrays and Java automatically checks array bounds, buffer overflows are only possible in unusual scenarios:

  1. If you call native code via JNI
  2. In the JVM itself (usually written in C++)
  3. The interpreter or JIT compiler does not work correctly (Java bytecode mandated bounds checks)

但是java确实是有这个异常:java.nio.BufferOverflowException

posted @ 2023-03-21 10:17  saaspeter  阅读(12)  评论(0编辑  收藏  举报