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: 394823
  • Unique Visitors: 54331
  • Registered Users: 75234
  • Last Registered User: Funduank
  • Published Nodes: 192
  • Your IP: 3.143.168.172
  • Since: 04/17/2023 - 16:53

Who's online

There are currently 0 users online.

Database Connection failed: Unknown MySQL server host 'richyancy.mynetgear.com:3306' (0)