String str = "abc"; & String str = new String("abc"); Why cant a button object be created as : Button bt = "abc"
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bala_Murugan
Posted On:   Friday, January 30, 2004 09:32 AM

In Java, You can create a String object as below :
String str = "abc"; & String str = new String("abc");
Why cant a button object be created as :
Button bt = "abc"
Why is it compulsory to create a button object as:
Button bt = new Button("abc");
Why this is not compulsory in String's case.


Please use html tags to format code blocks.

Re: String str = "abc"; & String str = new String("abc"); Why cant a button object be created as : Button bt = "abc"

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, February 2, 2004 06:10 AM

um, because "abc" IS already a String, but is not already a Button?

About | Sitemap | Contact