You are here

Home » Programming Languages » Java Reference


type varname[]
The most common way to declare an array is the same as in the C language. You declare an array variable with elements of type 'type'.

type[] varname
The alternative way for declaring an array is also the same as the C language. You declare an array variable with elements of type 'type'. In this way, the array notation is suffixed to the 'type'.

new type[numElements]
New array object with elements of type 'type'

array[index]
Element access

array.length
Length of array

Recent content

New forum topics

Recent comments

No comments available.

Google Search

Google Ads

Visitors

  • Total Visitors: 332871
  • Unique Visitors: 48663
  • Registered Users: 75211
  • Last Registered User: MusicDig
  • Published Nodes: 192
  • Your IP: 35.175.212.5
  • Since: 04/17/2023 - 16:53

Who's online

There are currently 0 users online.