-9

There are many words like '(Class1,Class2)' in JAVA API docs. What do these words represent?

enter image description here What does the '()', which I use red arows and green rectangle to mark in the picture, represent in the Java API doc?

陈黎栋John
  • 175
  • 1
  • 9

3 Answers3

1

There are the parameters the method take. Here cancel takes a String and a Throwable as parameters

From a method like this, you take just method(String a, String b)

static void method(String a, String b) {

}
azro
  • 53,056
  • 7
  • 34
  • 70
1

cancel is a method, so its called as cancel() with parameters inside the parentheses.

cancel(String, Throwable) means that its a cancel method with a String as a first parameter and a Throwable as a second parameter.

Buddy Christ
  • 1,364
  • 8
  • 22
1

It's just a method signature:

public abstract void cancel(@Nullable String message, @Nullable Throwable cause)
Matt
  • 1,298
  • 1
  • 12
  • 31