Multiple Choice
Consider the following class:
Public class Auto
{
Private String make;
Private String model;
Private String year;
Public Auto(String aMake, String aModel, String aYear)
{
Make = aMake;
Model = aModel;
Year = aYear;
}
Public String getInfo()
{
Return year + " " + make + " " + model;
}
}
Which of the following code snippets will correctly create an object of this class and display its information?
A) myAuto = new Auto() ;
System.out.println(myAuto.getInfo() ) ;
B) Auto myAuto = new Auto() ;
System.out.println(myAuto.getInfo() ) ;
C) Auto myAuto = new Auto("Ford", "Focus", "2011") ;
System.out.println(myAuto.getInfo() ) ;
D) Auto myAuto = new Auto("2011", "Ford", "Focus") ;
System.out.println(myAuto.getInfo() ) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q47: What type of method does NOT operate
Q48: A method in a class that modifies
Q49: Consider the following code snippet:<br>Public static class
Q50: Consider the following code snippet:<br>Public class BankAccount<br>{<br>Private
Q51: You have created a Student class. You
Q53: You have created a Rocket class which
Q54: Consider the following code snippet:<br>Public class Coin<br>{<br>Private
Q55: Consider the following code snippet:<br>Public class Coin<br>{<br>)
Q56: Insert the missing code in the following
Q57: Which of the following statements about objects