Calling methods in java and C# -


i have code:

public class e{   int k;   int m;   int c;    public method(int a,int b,int c){      k=a;     m=b;     c=c;    }  } 

can call method in java or c# without parameters separated commas:

e object=new e(); object.method(,,); 

can call method in java or c# without parameters separated commas:

no can't. according method's signature there expected 3 integer literals. being said, can't call way.

regarding c#, define a, b , c optional int, below:

public void method(int = 0, int b = 3, int c = 2) {     // ... } 

and call method below:

object.method() 

or as:

object.method(1); 

etc. regarding feature, please have here.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

c# - Json.Net Serialize String from URI -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -