0
If i create a method and i dont specify a type, will it be a String?
Thats all lol.
6 Antworten
+ 2
If you don't specify the method type, your program won't compile
+ 2
The only required elements of a method declaration are:
- the method's return type, (void , int string, double, string...)
-name,
-a pair of parentheses, (),
-instruction between braces, {}
return type is required ;)
+ 1
Not in Java
The closest thing is type void, means the method doesn't reruns any value
But again, you have to explicitly declare that
0
Ive seen an unspecified method in this app
0
directly it won't compile, and where have you seen that method? in the course? which part?
0
if you don't specify the type the program won't work