Rectangle great Room = new Rectangle () what is the name of the class and what is the reference variable name?

Update:

Rectangle great Room = new Rectangle () 

1. what is the name of the class ?

2. what is the reference variable name?

a. String   b. Rectangle  c. Scanner  d. greatRoom

a. Rectangle   b. greatRoom   c. new    d.new Rectangle

2 Answers

Relevance
  • 8 months ago
    Favorite Answer

    1. Rectangle

    2. greatRoom

  • 8 months ago

    That's a syntax error as typed or pasted--assuming that's either Java or C#.  The space in "great Room" is not allowed, and you need a ; semicolon to end a declaration.  If you changed that to:

        Rectangle greatRoom = new Rectangle();

    Then the class is Rectangle and the variable name is greatRoom.

    That doesn't look anything like a statement you could use in C++ (where the new operator returns a pointer, not a reference), JavaScript, Python, VB.NET, C, PHP, Ruby, Delphi/Pascal, or any of the other languages I've seen.  If you have a different language that one mentioned, you might want to add details to your question saying which one it is.

Still have questions? Get your answers by asking now.