---
title: "Discussion on \"length VS length()\" | Hashnode"
description: "Discussion on \"length VS length()\". length property:\nThe length variable is used to return the size of an array, i.e. number of elements stored in an array.\npublic class Hello{\n   public static void main(String args[]) {\n      int arr[] = {1, 2, 3, 4, 5, 6, 7};\n      System.out.println..."
url: "https://hashnode.com/posts/length-vs-length/645672d31c213371254689d8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [length VS length()](https://codegallery.hashnode.dev/length-vs-length?utm_source=hashnode&utm_medium=feed)

length property: The length variable is used to return the size of an array, i.e. number of elements stored in an array. public class Hello{ public static void main(String args\[\]) { int arr\[\] = {1, 2, 3, 4, 5, 6, 7}; System.out.println...

May 6, 2023 · 2 min read · codegallery.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#array](https://hashnode.com/tag/array)
-   [#string](https://hashnode.com/tag/string)

## Written by

[Parvathi Somasundaram](https://hashnode.com/@sparvathi6023)

@sparvathi6023

  
[View profile](https://hashnode.com/@sparvathi6023)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
