# CallStatic

> Call a static Java method on a class.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.AndroidJNIModule

## CallStatic\<T>(string, \`\<>\[])

Call a static Java method on a class.

```csharp
public void CallStatic<T>(string methodName, T[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Specifies which method to call.**** (\[\<T>\[]]\(./)): An array of parameters passed to the method.

### Remarks

To call a static method with return type 'void', use the regular version.

## CallStatic\<T>(IntPtr, \`\<>\[])

Call a static Java method on a class.

```csharp
public void CallStatic<T>(nint methodID, T[] args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (\[\<T>\[]]\(./)): An array of parameters passed to the method.

### Remarks

To call a static method with return type 'void', use the regular version.

## CallStatic(string, Object\[])

Call a static Java method on a class.

```csharp
public void CallStatic(string methodName, params object[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Specifies which method to call.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): An array of parameters passed to the method.

### Remarks

To call a static method with return type 'void', use the regular version.

## CallStatic(IntPtr, Object\[])

Call a static Java method on a class.

```csharp
public void CallStatic(nint methodID, params object[] args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): An array of parameters passed to the method.

### Remarks

To call a static method with return type 'void', use the regular version.

## CallStatic\<T, U>(string, \`\<T>\[])

Call a static Java method on a class.

```csharp
public ReturnType CallStatic<ReturnType, T>(string methodName, T[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Specifies which method to call.**** (\[\<T>\[]]\(./)): An array of parameters passed to the method.

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

To call a static method with a non-void return type, use the generic version.

## CallStatic\<T, U>(IntPtr, \`\<T>\[])

Call a static Java method on a class.

```csharp
public ReturnType CallStatic<ReturnType, T>(nint methodID, T[] args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (\[\<T>\[]]\(./)): An array of parameters passed to the method.

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

To call a static method with a non-void return type, use the generic version.

## CallStatic\<T>(string, Object\[])

Call a static Java method on a class.

```csharp
public ReturnType CallStatic<ReturnType>(string methodName, params object[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Specifies which method to call.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): An array of parameters passed to the method.

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

To call a static method with a non-void return type, use the generic version.

## CallStatic\<T>(IntPtr, Object\[])

Call a static Java method on a class.

```csharp
public ReturnType CallStatic<ReturnType>(nint methodID, params object[] args)
```

### Parameters

**** (\[IntPtr]\(https\://learn.microsoft.com/dotnet/api/system.intptr)): The ID of the method to call.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): An array of parameters passed to the method.

### Returns

| Type | Description |
| ---- | ----------- |
| T    |             |

### Remarks

To call a static method with a non-void return type, use the generic version.
