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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:14:28+00:00 2026-05-15T13:14:28+00:00

I’ve read the questions/answers saying that Java doesn’t have nor is it likely to

  • 0

I’ve read the questions/answers saying that Java doesn’t have nor is it likely to get C# style properties. However, in this question: How to organize database access code in Android project?, there is an answer with some sample code like this:

c = localDBRW.rawQuery(sql, selectionArgs);

In the comments to that answer he says that localDBRW is “defined as a reference to getWritableDatabase().” To me that means that in the line above getWritableDatabase() is called and rawQuery is called on the result of getWritableDatabase().

So my question is: How is that done?

In C# it would be trivial. I’m new to Java, so I’m not even sure what the terminology is that would lead me to an answer. Searches on “properties”, “methods”, and “references” haven’t led to this particular usage.

Summary of answers:

I was grasping at a dream. I was interpreting the original statement in a way that would mean my wishes could come true. Alas, that is not the way of things. Java is without any hope of C# property syntax and I am banished to an eternity of writing obj.getX() instead of obj.X.

  • 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-15T13:14:29+00:00Added an answer on May 15, 2026 at 1:14 pm

    localDBRW is “defined as a reference to getWritableDatabase()“

    I believe this simply means that there was this statement prior to the usage, and nothing more:

    localDBRW = getWritableDatabase();
    

    There is currently no property-like semantics in Java. You can’t, using a field access syntax, invoke a method instead. The closest thing to this would be if a field is accessed for the first time and that triggers its initialization code, but that’s an entirely different construct.

    Related questions

    • (no) Properties in Java?
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

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.