Discussion board
why Object is not created in main method?
By suman dustakar
import Car_package.*;

public class CarImportPackage {

public static void main (String[] args)

{
Car.display (777, "Ferrari");
}
}

In the above class they hav called display method frm the Car_package by using the class "Car"(which is implemented in Car_package), can anybody plz explain me tht, Why Object is not created in the main method to call "display" method? how can they use the class "Car" to call display method Instead of using Object?......plz clear my doubt.. thanking u in advance...
Reply
Post   Reset
Gurpreet kohli replied to suman dustakar Tuesday, May 11, 2010
hi!! suman i thnk whether it is inheritence,packages or interfaces
the object of the main class is not created always..