dot length in java - finding its definition

前端 未结 7 1227
野趣味
野趣味 2021-01-03 00:31

In which class is the length field defined in Java (e.g. for array length)? Will I be able to see it defined say in Object class?

EDIT : Wh

7条回答
  •  悲&欢浪女
    2021-01-03 01:04

    Arrays are not like regular classes, they are a special case defined in the Java Language Specification. So the .length public final variable is defined in the Java Language Specification, but it is not actually defined anywhere in a .java or a .class file.

提交回复
热议问题