# Using reflections in HTM Java

**URL:** <https://discourse.numenta.org/t/using-reflections-in-htm-java/5875>\
**Category:** HTM.Java\
**Created:** [April 22, 2019, 5:27pm UTC](https://discourse.numenta.org/t/using-reflections-in-htm-java/5875 "2019-04-22T17:27:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwidanage](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/cwidanage/32/3926_2.png) [@cwidanage](https://discourse.numenta.org/u/cwidanage)\
**Post date:** [April 22, 2019, 5:27pm UTC](https://discourse.numenta.org/t/using-reflections-in-htm-java/5875/1 "2019-04-22T17:27:43Z")

</div>

Hi,

Is there any particular reason for using reflections in HTM Java. Specially in class SparseBinaryMatrix, given it’s always going to be an int array.

this.backingArray = Array.newInstance(int.class, dimensions);

This makes reading the array super expensive.

 ![Screenshot%20from%202019-04-22%2013-26-58](https://canada1.discourse-cdn.com/flex030/uploads/numenta/original/2X/1/1ec26a3f09ca8351bdeb771049c23e00441eae89.png)

Regards,  
Chathura
