Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Assigning something to "this"?

  Asked By: Carole    Date: Oct 12    Category: Java    Views: 502
  

Is it legal?

Can I have a constructor that does:

public Ship( String S ) {
if( S.equals( "Tug" ) ){
this=new Tug( S );
}
}

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Assigning something to "this"? Or get search suggestion and latest updates.




Tagged: