0
What's the problem?
public class Program { static String size; public static void main(String[] args) { size.set("small"); System.out.println (size); } }
4 Réponses
+ 1
There is no set method defined in the class. Also you generally use that when setting field values for objects.
In this case you could just simply write-
size = "small";
0
Avinesh ty, can you please give me a simple example when you use the "set" thing?
0
yahel a simple demonstration.
https://code.sololearn.com/c7LQGwFDuqX5/?ref=app
0
Avinesh thanks!