Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# Byte2\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nByte2\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/renderscript/Byte2 \"View this page in Java\") \n\n```\nopen class Byte2\n```\n\n|---|---------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.renderscript.Byte2](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 31.**\n|\n| Renderscript has been deprecated in API level 31. Please refer to the [migration guide](https://developer.android.com/guide/topics/renderscript/migration-guide) for the proposed alternatives.\n\nClass for exposing the native RenderScript byte2 type back to the Android system.\n\nSummary\n-------\n\n| Public constructors ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [Byte2](#Byte2())`()` \u003cbr /\u003e |\n| [Byte2](#Byte2(kotlin.Byte,%20kotlin.Byte))`(`initX:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`, `initY:` `[Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html)`)` \u003cbr /\u003e |\n\n| Properties ||\n|------------------------------------------------------------------------------|----------------------------|\n| [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html) | [x](#x:kotlin.Byte) \u003cbr /\u003e |\n| [Byte](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte/index.html) | [y](#y:kotlin.Byte) \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### Byte2\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nByte2()\n``` \n\n### Byte2\n\nAdded in [API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nByte2(\n initX: Byte, \n initY: Byte)\n```\n\nProperties\n----------\n\n### x\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar x: Byte\n```\n\n**Deprecated:** *Deprecated in Java.* \n\n### y\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar y: Byte\n```\n\n**Deprecated:** *Deprecated in Java.*"]]