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

The Archive Base Latest Questions

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

When debugging a java program in Eclipse, in the Variables view, when you highlight

  • 0

When debugging a java program in Eclipse, in the Variables view, when you highlight a variable it prints detail for that variable in the pane below. That pane is called the “Detail View,” and the value displayed is the “detail” for the variable. By default, it is simply the result of calling .toString() on the variable. But Eclipse allows you to specify and customize “Detail Formatters” for arbitrary objects that maps them to more helpful and descriptive strings in that view.

My question is this: the .toString() method invoked on an array (say of Integers) returns an unhelpful memory address. However, when I highlight an array variable in debug mode, Eclipse seems to intelligently parse it into a really helpful comma-delimited string (e.g. "[42, 13, null, 19]"). I gather that means Eclipse has established a default Detail Formatter for arrays with really helpful functionality. Does anyone know how I can leverage that Detail Formatter in my code to avoid rewriting identical logic?

In case you’re interested, the motivation is generating the contents of an IN clause for a SQL query. That is, I’m trying to generate a SQL Query:

SELECT * FROM table WHERE id IN (1,2,3)

from on an arbitrary int[]:

int[] ids = new int[] {1,2,3}

I realize I could accomplish this by writing a for loop, using StringBuilder, etc., but I was wondering if Eclipse has already done that for me and exposes a helpful method (Read: I am exceedingly lazy)

  • 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-28T07:15:11+00:00Added an answer on May 28, 2026 at 7:15 am

    Eclipse uses Arrays.toString, but if you want to use parentheses instead of square brackets, you might want to use Guava:

    return "(" + Ints.join(",", array) + ")";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When debugging Java code, Eclipse has a feature that allows it to find all
I am debugging a Java program in Eclipse. This program normally writes binary data
Suppose that I have a Java program within an IDE (Eclipse in this case).
I'm working with a Java program that has multiple components (with Eclipse & Ant
So I'm (remotely) debugging a java/jboss application in Eclipse, stepping through line by line.
I come from Java Background and so used to Debugging using Eclipse but have
Debugging a PHP program, is there any add-on/plug-in for browser which I can view
When debugging a java program in netbeans, I want the debugger to stop on
While debugging Java code, Strings in the views Variables and Expressions show up only
Debugging my code with Java's jdb. Am stuck at a point where my program

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.