A good answer might be:

String ant = "It was a dark and stormy night." 
    Correct. This is the short way of making a string.
String bat = new( "A shot rang out in the dark." ); 
    Wrong--new needs a constructor name.
int    cat = "123"; 
    Wrong--can't initialize an int to a String
double dog = 45.69; 
    Correct

End of the Chapter

You may wish to review the following. Click on a blue subject that interests you to go to where it was discussed. To get back here, click on the "back arrow" button of your browser.

The next chapter will discuss object references.



Click here ——Back to the main menu.

You have reached the end of the chapter.