java - Unexpected error in Eclipse Juno main class -


this error getting in main class cartester @ line 21:

enter image description here

this class car:

package mohantyashutosh; public class car {     private int mileage;     private int gaspresent;     private int price;     public car(int mileage, int gaspresent, int price) {         this.mileage = mileage;         this.gaspresent = gaspresent;         this.price = price;     }     public car() {         // todo auto-generated constructor stub         mileage = 20;         gaspresent = 1 ;         price = 500000;     }     public void drive(int distance) {      }     public void addgas(int quantity){      } } 

i cannot understand why during object creation in main class, cannot take parameterized constructor.


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -