Wednesday, December 23, 2009

How do I create an object called myBook that would call the constructor that requires 3 arguments?

Can someone please help me out with this code?How do I create an object called myBook that would call the constructor that requires 3 arguments?
What programming language?





Assuming the name of the class for this object is Book:





Java:


Book myBook = new Book(arg1, arg2, arg3);


JavaScript:


var myBook = new Book(arg1, arg2, arg3);


PHP:


$myBook = new Book($arg1, $arg2, $arg3);


C++:


Book myBook(arg1, arg2, arg3);


Actionscript:


var myBook:Book = new Book(arg1, arg2, arg3);


Python:


myBook = Book(arg1, arg2, arg3)

No comments:

Post a Comment