java - what is actual and formal argument lists differ in length and how to fix it in my code -


so keep getting error when try run program problem dont know in driver. thats part of assignment. line of code believe giving me issue.

public votingmachine(int d, int r, int i) {     dvotes = d;     rvotes = r;     ivotes = i; } 

and error keep getting.

/tmp/codecheck/17091202408150120863985811601/submission/votingsimulation.java:9 error: constructor votingmachine in class votingmachine cannot applied given types;  votingmachine vm = new votingmachine();                    ^ required: int,int,int found: no arguments reason: actual , formal argument lists differ in length 

i have no idea why doing please if need more info let me know or other lines of code.

in java, if provide constructor arguments, must explicitly provide no-arg constructor; not there implicitly.

i.e. add no-arg constructor class


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -