public class BicycleTest {
public static void main( String[] args )
{
// Create 1 Bicycle reference variable
Bicycle bike;
// Create 1 String reference variable for the owner's name
String name;
// Create 1 integer variable for the license number
int number;
// Assign your full name and a license number to the String and
// integer variables
name = "Josh";
number = 12345;
// Create a Bicycle object with the Bicycle constructor
// Use the variables you created as arguments to the constructor
Bicycle bike = new Bicycle("Josh", 12345);
// Output the owner's name and license number in printf statements
// using the object reference and the get methods.
// For example: bike.getOwnerName()
System.out.printf("The owner is %s\n", bike.getownerName());
System.out.printf("The license number is %d\n", bike.getlicenseNumber());
bike.setownerName(); {
ownerName = "Kenny McCormick";
}
System.out.printf("The owner is %s\n", bike.getownerName());
System.out.printf("The license number is %d\n", bike.getlicenseNumber());
}
}
these are the error messages that i keep getting:
bike is already defined in main(java.lang.String[])
cannot find symbol method getlicenseNumber()
cannot find symbol method getownerName()
cannot find symbol method setownerName()
cannot find symbol variable ownerName
cannot find symbol variable licenseNumber
This post has been edited by pyr0b0y: 22 February 2009 - 06:17 PM

New Topic/Question
Reply




MultiQuote






|