0
Is it necessary to mention public for a method in interface?
6 Answers
+ 1
Generally no...? which language?
+ 1
Hhhmmmmm, from the info I can find: seems they are public by default so you *shouldn't* have to, but all examples show public explicitly defined, so perhaps a conversation is to explicitly declare...
Simple way to find out: what happens if you don't?
+ 1
Taste ah, so public is required in Java if you want it to be accessible outside the package? In TypeScript it's not even an option as it is inferred anyway...
0
Java
0
the default is package level scope, not public.
the method will be only accessible from the same package.
0
aah it seems that i really missed the point,