This flashcard is just one of a free flashcard set. See all flashcards!
2
If Triangle is defined as an object, which of the following statements declare, create and assign an object reference to the variable myTriangle?
A) Triangle myTriangle;
B) myTriangle = new Triangle( );
C) Triangle myTriangle = new Triangle( );
D) New Triangle( ):
A) Triangle myTriangle;
B) myTriangle = new Triangle( );
C) Triangle myTriangle = new Triangle( );
D) New Triangle( ):
C) Triangle myTriangle = new Triangle( );