# AndroidJavaClass(string)

> Construct an AndroidJavaClass from the class name.

## Definition

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

```csharp
public AndroidJavaClass(string className)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Specifies the Java class name (e.g. \\\<tt\\>java.lang.String\\\</tt\\>).

### Remarks

This essentially means locate the class type and allocate a \\\<tt\\>java.lang.Class\\\</tt\\> object of that particular type. It allows you to access static properties and methods of the Java/Kotlin classes without creating an instance or allocating additional memory.

The following code example demonstrates the use of `AndroidJavaClass` constructor for interacting with Java code. It shows how to access a static property from a Java class to retrieve the maximum possible value of an integer.

```csharp
using UnityEngine;

public class AccessJavaLangIntegerStatic : MonoBehaviour
{
    void Start()
    {
        var integerClass = new AndroidJavaClass("java.lang.Integer");
        int maxValue = integerClass.GetStatic<int>("MAX_VALUE");
        Debug.Log("java.lang.Integer.MAX_VALUE: " + maxValue);
    }
}
```

The following code examples demonstrate how to use the `AndroidJavaClass` constructor to interact with Kotlin code. The following Kotlin example defines a static method to compute the hash code of a string.

```csharp
object KotlinStringHelper {
   @JvmStatic
   fun getStringHashCode(inputString: String?): Int {
       return inputString?.hashCode() ?: 0
   }
}
```

The following C# example shows how to call the Kotlin method in Unity.

```csharp
using UnityEngine;
public class KotlinExamples
{
    public static int GetKotlinStringHashCode(string text)
    {
        //Use Kotlin object name
        using (AndroidJavaClass kotlinClass = new AndroidJavaClass("KotlinStringHelper")) 
        {
            int hash = kotlinClass.CallStatic<int>("getStringHashCode", text);
            return hash;
        }
    }
}
```
