Home > Back-end >  . Write a program to create the Hello class, to rewrite the Object class in the class of the toStrin
. Write a program to create the Hello class, to rewrite the Object class in the class of the toStrin

Time:09-29

Public class Hello
{
Public String toString ()
{
Return "Say" "+ getClass (). The getName () +" "to Java".
}
Public static void main (String [] args)
{
System. The out. Println (new Hello ());
}
}
But always prompt after the operation I need line 5 '; 'but it is normal operation of the textbook
  • Related