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

  • Home
  • SEARCH
  • 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 7760029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:46:32+00:00 2026-06-01T13:46:32+00:00

I’m learning Java and find myself sending methods around while asking for help but

  • 0

I’m learning Java and find myself sending methods around while asking for help but my problem is I have many methods and the data is modified at each method. I often have to send large files when only one area is relevant(it makes my SO questions excessively long as well).

But for some of the stuff I do, I can’t get the right data format to be outputted as string that I can input later. For example, if I add data to a list of Points(like this, (new Point(0, 0));) then when I output the results I get something like this(with sample data):

[java.awt.Point[x=970,y=10], java.awt.Point[x=65,y=10], java.awt.Point[x=729,y=10]

I get errors when I assign this to a variable and send it to my method I want to test/show. I basically have two goals:

  1. If I want help on a single method(thats part of a much larger class), I want to be able to send the least amount of code to the person helping me(ideally just the method itself and the inputs..which I’m unable to capture exactly right now).
  2. When I test my code, I would like a way to isolate a method so I don’t have to run a large file when all I can about is improving one method.

I am pretty sure I’m not the first person to come across this problem, How can I approach this?

UPDATE: Here’s an example,

double[] data = new double[] {.05, .02, -.03, .04, .01}; 
System.out.println(data); //output is: [D@13fcf0ce 

If I make a new variable of this and send it to a method I get errors. I have 30 methods in a class. I want to have a friend help me with one. I’m to avoid sending 29 methods that are irrelevant to the person. So I need a way to capture the data, but printout doesn’t seem to capture it in a way I can send to methods.

  • 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-06-01T13:46:34+00:00Added an answer on June 1, 2026 at 1:46 pm

    Java outputs variables in a way that is human-readable (although it depends on the object’s toString method). The output of toString is (unsurprisingly) a String. Unless you have a parsing mechanism to turn a string back into the original object, it’s a one-way operation.

    There should be no need to turn it back into the original object, however. If you’re trying to isolate a function and sample data, the easiest thing to do is encapsulate it in a test and some data–there are many different ways to do this and communicate it to someone else.

    I’m still unclear on your usecase, however. If it’s an SO question, all you should need to do is show the code in question, provide a minimal amount of data that shows the problem, and you’re done. This could be done in a self-contained example where you simple create the data in code, as a unit test, or by showing the string output as you’ve already done.

    If you’re trying to communicate the issue to a tech support tier, then the best mechanism depends entirely on what they’re equipped to handle–they’ll tell you if you didn’t do it right, believe me.

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.