I\'m sorry for asking this sort of questions, but I really couldn\'t find the answer in Google. So say I have a class with private String myColor and I have a s
It depends where you want to do this. Inside the class you simply whatever with it, e.g:
myColor = "blah blah";
From outside, you need to have some public method generally as other posts indicated. In all cases, you have to be careful if your environment in multi-threaded. Class level variables are not thread safe.