Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7502061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:44:27+00:00 2026-05-29T20:44:27+00:00

We can determine the length of an ArrayList<E> using its public method size() ,

  • 0

We can determine the length of an ArrayList<E> using its public method size(), like

ArrayList<Integer> arr = new ArrayList(10);
int size = arr.size();

Similarly we can determine the length of an Array object using the length property

String[] str = new String[10];
int size =  str.length;

Whereas the size() method of ArrayList is defined inside the ArrayList class, where is this length property of Array defined?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T20:44:31+00:00Added an answer on May 29, 2026 at 8:44 pm

    Arrays are special objects in java, they have a simple attribute named length which is final.

    There is no “class definition” of an array (you can’t find it in any .class file), they’re a part of the language itself.

    10.7. Array Members

    The members of an array type are all of the following:

    • The public final field length, which contains the number of components of the array. length may be positive or zero.
    • The public method clone, which overrides the method of the same name in class Object and throws no checked exceptions. The return type of the clone method of an array type T[] is T[].

      A clone of a multidimensional array is shallow, which is to say that it creates only a single new array. Subarrays are shared.

    • All the members inherited from class Object; the only method of Object that is not inherited is its clone method.

    Resources:

    • JLS – Arrays
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I determine if my displays are in Clone Mode without using either
Given n squares with edge length l , how can I determine the minimum
How can I determine the maximum filename length on a linux box? Preferred in
describe an algorithm that can determine the length of an array in O(log n).
In Blender (v2.48), how can I determine the length of a path (in Blender
How can i determine the max length IO#read can get in a single read
Can somebody please let me know how we can determine if a local disk
Is there a way my program can determine when it's running on a Remote
I want to write a sh/bash script that can determine whether a particular directory
How can I determine the IP of my router/gateway in Java? I can get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.