Biology Forums - Study Force

Science-Related Homework Help Computer Studies Topic started by: Izaganag on Sep 21, 2015



Title: Which of the following would best redefine the toString method for BClass?
Post by: Izaganag on Sep 21, 2015
Which of the following would best redefine the toString method for BClass?
A) public String toString(int z)
{
   return " " + x + "   " + y + "   " + z;
}
B) public String toString( )
{
   return super.toString( );
}
C) public String toString( )
{
   return super.toString( ) + "   " + z;
}
D) public String toString( )
{
   return super.toString( ) + "   "  x + "   " + y + "   " + z;
}
E) public String toString( )
{
   return " " + x +    " + y + "   " + z;
}


Title: Re: Which of the following would best redefine the toString method for BClass?
Post by: habibti on Sep 25, 2015
Content hidden


Title: Re: Which of the following would best redefine the toString method for BClass?
Post by: Izaganag on Sep 28, 2015
I regret taking this computer science course. Should just stick to history :P Thanks for your help.


Title: Re: Which of the following would best redefine the toString method for BClass?
Post by: habibti on Sep 28, 2015
Give me a shout if you need anymore help.