Java方法签名中的L,Z和V.

dzi*_*iou 7 java

我越来越

java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V
Run Code Online (Sandbox Code Playgroud)

是什么L,Z以及V立场?

fre*_*ev4 12

JVM规范的4.3.2节:

Character     Type          Interpretation
------------------------------------------
B             byte          signed byte
C             char          Unicode character
D             double        double-precision floating-point value
F             float         single-precision floating-point value
I             int           integer
J             long          long integer
L<classname>; reference     an instance of class 
S             short         signed short
Z             boolean       true or false
[             reference     one array dimension

  • + V代表无效 (4认同)

use*_*551 7

这些是基元的类型签名:

Type Signature                           Java Type
       V                                    void
       Z                                    boolean
       B                                    byte
       C                                    char
       S                                    short
       I                                    int
       J                                    long
       F                                    float
       D                                    double                                          
L fully-qualified-class;            fully-qualified-class
    [ type                                  type[]
Run Code Online (Sandbox Code Playgroud)

setFeature取a String和a boolean并返回void