# How can I access a custom class from an Activity

**URL:** <https://discuss.kotlinlang.org/t/how-can-i-access-a-custom-class-from-an-activity/26052>\
**Category:** Uncategorized\
**Created:** [December 8, 2022, 10:17am UTC](https://discuss.kotlinlang.org/t/how-can-i-access-a-custom-class-from-an-activity/26052 "2022-12-08T10:17:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Calippo](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Calippo](https://discuss.kotlinlang.org/u/Calippo)\
**Post date:** [December 8, 2022, 10:17am UTC](https://discuss.kotlinlang.org/t/how-can-i-access-a-custom-class-from-an-activity/26052/1 "2022-12-08T10:17:41Z")

</div>

Hi

I’m new to Kotlin and have created a class with my data and some functions

How can I implement the class to my MainActivity in order to access the functions  
from my own class

Help would be great

val class = new class2 ???
