Make a toString method and customize the way you want to build your string.
An example of this can be the following
public String toString() {
String s = "";
`//building the string you want to return like so 's = //How you want it. '`
return s;
}
More Related Contents:
- When does object pointed by 'Example.class' come into existence?
- Update Eclipse with Android development tools v. 23
- Several ports (8005, 8080, 8009) required by Tomcat Server at localhost are already in use
- The type java.lang.CharSequence cannot be resolved in package declaration
- Setting property ‘source’ to ‘org.eclipse.jst.jee.server:JSFTut’ did not find a matching property
- NoClassDefFoundError in Eclipse
- Import XXX cannot be resolved for Java SE standard classes [duplicate]
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- How to pass console arguments to application in eclipse?
- Eclipse will not open due to environment variables [duplicate]
- Error inflating class com.google.ads.AdView
- InvalidModuleDescriptorException when running my first java app
- Getting ‘java.lang.UnsatisfiedLinkError’: no lwjgl in java.library.path
- Display omitted versions in maven dependency:tree?
- eclipse with Android sdk, ERROR: Java heap space
- Java equivalent to #region in C#
- How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9
- how to export (JUnit) test suite as executable jar
- Java Regex pattern that matches in any online tester but doesn’t in Eclipse
- Maven build failed: “Unable to locate the Javac Compiler in: jre or jdk issue”
- Find methods calls in Eclipse project
- How to create a executable jar file for Testng and the runnnig point should be the Xml file
- How to get current class name including package name in Java?
- Using assertArrayEquals in unit tests
- Changing Tomcat context path of web project in Eclipse
- ClassNotFoundException DispatcherServlet when launching Tomcat (Maven dependencies not copied to wtpwebapps)
- Libraries for pretty charts in SWT? [closed]
- Create executable Jar file under Eclipse
- Setting the correct PATH for Eclipse
- Why is Ant giving me a Unsupported major.minor version error