array in jav code example Example 1: how to define array int array[N]; Example 2: How to use an array var fruits=["orange","apple"];