+ 2
Do you think it is a header for a constructor or a method?why?
public Employee( string name, string emploteeNumbet )
5 Respostas
+ 12
Constructor because there's no return type
+ 12
Methods are declared like this:
modifier returnType methodName(paramType param) {
}
There are more options like static, final, exceptions that I miss out for simplicity.
A constructor is method-like, but declared like this:
modifier className (paramType param) {
}
It has a return type, but as it always returns an object of the constructor's class it must not be declared.
+ 11
The other things. The "int" in "public static int Main()" and the "String" in "public String GetName()"
+ 2
thank you very much, I always make this up in class, but thanks to this app, I m much clear with the basic concept now, also other user are very nice ! thumbs up to this app
+ 1
do you mean the ' ; ' ? or other things?