Comment on Tutorial - Use of return statement in Java By Emiley J



Comment Added by : Anonymous

Comment Added at : 2013-05-17 08:53:20

Comment on Tutorial : Use of return statement in Java By Emiley J
Comment: Just for future readers: (apart from the annoying capulation the last reader used): toString(), make a method hereof:
public String toString() { String s = \"blablabla\" + w.e you want to add from the class + \"blabla \" + (you can add w.e you like aslong if its in the class); return s; } and where you want it get the toString() method, and System.out.println (or w/e you use like a label) and you can get it on your screen.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. I am running it within NetBeans. I set a breakpoin
View Tutorial          By: PeteC at 2014-02-22 18:57:14

2. tnx, nice code...
View Tutorial          By: Hansoc at 2009-08-18 00:17:58

3. Plz can someone help me, I copied the code above a
View Tutorial          By: Dse90 at 2010-02-10 04:28:34

4. good....
View Tutorial          By: Rini at 2013-01-08 10:44:54

5. Can anybody tell the steps to go ahead with the ex
View Tutorial          By: shikha at 2009-11-03 10:42:34

6. Hi Andrew,

I have a java applicatio

View Tutorial          By: kumar at 2010-10-06 10:42:55

7. Nice and easy to understand......Thanks for same
View Tutorial          By: vikas at 2011-07-21 07:44:30

8. I find dis site very educating
View Tutorial          By: Kensho at 2009-05-09 05:18:57

9. Its very usefull to clear understanding for us .Th
View Tutorial          By: vijay at 2015-07-16 09:29:40

10. It takes me time to understand the process of the
View Tutorial          By: Abdullah Ibrahim at 2012-04-11 00:38:23