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 6774185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:45:24+00:00 2026-05-26T15:45:24+00:00

I understand that this question is similar to others asking about Java Properties, and

  • 0

I understand that this question is similar to others asking about Java Properties, and the answers in those questions seem to be “no, you have to use getters/setters”.

I searched for C#-like Java properties, but have only found one “hit” so far. And I’m not sure if it is a property or something else.

Reading the Java Tutorial, I came across some text and code that says (** emphasis and comment mine):

Finally, you can use the built-in **length property** to determine the
size of any array. The code:

 //notice lack of brackets after anArray.length :
 System.out.println(anArray.length);

will print the array's size to standard output.

Since Array has a length property, Java does have properties, right?

Can someone point to some documentation about them?

  • 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-26T15:45:25+00:00Added an answer on May 26, 2026 at 3:45 pm

    It really depends what definition you’re using. Accessing some class’s data without using parentheses is a very weak definition of “property.” You can make any class/instance member field public and thus have it accessible without using a method.

    That doesn’t make it like a C# property where you can add custom logic to how getting and setting is done on that field though! You’re straight up reading from/writing to a variable. The length field of an array is not writable and is in fact immutable, so it’s not horrible style for that to have been done. But other classes that expose their fields have gotten into trouble, like Point and Dimension.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is for the java language in particular. I understand that there is
I understand that this question may seem somewhat ungrounded, but if someone knows anything
I understand that this question could be answered with a simple sentence and that
I understand the problem that OSGI solved thanks to this question.... What does OSGi
This is a short question. At some point my thread understand that it should
This question seems similar to those asked in a few other posts: here and
I understand that this is a very broad question, but a short it depends
I have been doing some research about this and have found a few similar
My question is similar to this question . Though I have not been able
I'll start of by saying that I understand that this topic is complicated and

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.