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 have connected my phone through bluetooth and us
View Tutorial          By: nikitha at 2013-02-05 09:07:34

2. its very helpful and understandable.thanq
View Tutorial          By: Deepika darapaneni at 2012-03-24 14:16:39

3. It is nice...
View Tutorial          By: Bunty at 2011-02-20 23:43:53

4. No use of this example.
I was searching oth

View Tutorial          By: Karan at 2010-04-10 05:41:47

5. I can't compile the source with Dev-C++ 4.9.9.2, h
View Tutorial          By: ToKha at 2013-11-19 01:32:34

6. Hello Friends ,

s1 == s2 will alway

View Tutorial          By: Gunjan at 2010-09-08 19:24:24

7. i like the example and it helped me understand the
View Tutorial          By: Danny at 2009-10-23 02:09:06

8. Hey nice article Brian W. Kernighan and/or Dennis
View Tutorial          By: butt at 2013-01-17 07:12:21

9. Thanks a lot !
View Tutorial          By: Kalander bava ta at 2012-11-04 08:07:15

10. if i wanna push the data from my keyboard input, h
View Tutorial          By: andys at 2008-11-09 03:09:32