ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Why toString ?

The toString() method of the Object class will execute when we print the reference variable in our class.**
    public class HelloWorld {
    public static void main(String a[]) {
    String name = “Venu”;
    System.out.println(“the name is : “+name);
    } }//because the String class is overriding the toString().
Related Posts Plugin for WordPress, Blogger...
Flag Counter