Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

L, Z and V in Java method signature

Tags:

java

I'm getting

java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V

What do L, Z, and V stand for?

like image 718
dzieciou Avatar asked Jun 28 '16 14:06

dzieciou


People also ask

What is the signature of a Java method?

The method signature in java is defined as the structure of the method that is designed by the programmer. The method signature is the combination of the method name and the parameter list. The method signature depicts the behavior of the method i.e types of values of the method, return type of the method, etc.

What is signature of a class in Java?

A signature is a list that specifies a class constructor, an instance method, or a static method, thereby distinguishing it from other constructors, instance methods, or static methods.

What does V mean in Java?

V in a type signature means void type. Bytecode does not differentiate constructors from other methods (other than using special method name).

Which is used as a part of method signature in Java?

In Java, a method signature paints a picture about how to use the method. The only required elements of a method signature are the method's return type, the method name, parentheses for the parameter list (which can be empty), and the method body inside curly braces (which can also be empty).

What is a method signature in Java?

What is a method signature in Java? The method signature consists of the method name and the parameter list. Method signature does not include the return type of the method. A class cannot have two methods with same signature.

What does V mean in a JVM signature?

I'm confused what "V" means? I expected either public Echo (); or something similar... Show activity on this post. The JVM uses a compact way of storing method signatures, of which constructors are considered a special case. Show activity on this post. Show activity on this post. V in a type signature means void type.

Which type type takes a string and returns a void?

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 [] setFeature takes a String and a boolean and returns void.

What is method name in Java?

Method Name: A Java Method Name can be a combination of Alphabets, Numbers and Special Symbols (Underscore and Dollar only). Method name can start with a Letter or Alphabet. Method name can start with either Underscore (_) or Dollar ($) symbol. Method name can not start with a number. Method name can contain numbers in-between or at the end.


1 Answers

Section 4.3.2 of the JVM Spec:

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
like image 166
freddiev4 Avatar answered Oct 20 '22 00:10

freddiev4