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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:33:51+00:00 2026-05-26T14:33:51+00:00

By default when viewing watches/variables of objects in Netbeans, it shows its address instead

  • 0

By default when viewing watches/variables of objects in Netbeans, it shows its address instead of its value. This is quite tiresome since I have to expand the variable to see its real value (e.g. for Double, Integer, Date, etc). As it turns out, Netbeans has “Variable formatters” but there is hardly any documentation that i can find for it.

How would I go about displaying e.g. a simple Date variable in a human readable format in the Watches/Variables window? I don’t fully understand the “Edit Variable Formatter” dialog.

I was able to properly do it for Double and Integer by using the following code snippet:
toString()

So the code seems to run in the context of the Double/Integer class. How would I refer to the actual variable if I need to do something more advanced such as:

return DateHelpers.formatDate(dateVariableName??, "yyyy-MM-dd");
  • 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-26T14:33:51+00:00Added an answer on May 26, 2026 at 2:33 pm

    In the variables view, you have a small $ icon (at the top left) which tooltip says :”Show variable value as toString() or formatted value”.

    Just click that, it will show you the “value” of those variables.

    EDIT: If you want to add a variable formatter, it’s very simple. On the variable formatter view, just click the “Add …” button then:

    • In “Formatter Name” put the name of you formatter eg. “My Date formatter”
    • “Class Types” put your complete class name eg. java.util.Date
    • Select “Value formatted as a result of code snippet” and type the code to apply. For instance:

    toString()

    but if you want to manipulate the data or display some other thing you can. For instance:

    toString() + " (" + getTime() + ")"
    

    Which will display the time in human readable format plus the time as a long.

    Don’t forget to select the $ icon on the view to apply your formatter.

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

Sidebar

Related Questions

By default the webjump hotlist has the following which I use quite often: M-x
By default, emacs 22.1.1 only shows the top of the compilation buffer when you
By default netbeans stores it's settings in a directory called .netbeans under the user's
I would like to change the wordpress default query to orderby title when viewing
Folks, when viewing a contact, you can press on the address to view that
While viewing the HTML IE 8 sets the default document mode as IE8 Standards
I've created an SPList instance with some custom fields. But When I'm viewing this
I would like to find some way of Viewing a Directory in the default
default is 49 how to edit to higher?
The default shell in Mac OS X is bash , which I'm generally happy

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.