one of my goals for this year is to learn java, and I found an excuse to get started lately. So over hte last couple of hours I have been reading tutorials and the likes, and started following the advice from this post http://www.daniweb.com/software-development/java/threads/99132/starting-java-java-tutorials-resources-faq
As such I am up to this point http://docs.oracle.com/javase/tutorial/java/concepts/QandE/questions.html
it suggested I lookeda around and made note of the state/ behaviours of objects surrounding me. As such I noted the only things that jumped out at me , my books and hte tv, which seemed sufficient for the exercise. However, for the tv I am trying to use an enum to select between tv mode i.e hdmi, tv, component etc. Just seemed like an excuse to check out the enums! However I have compile errors and don't know the appropriate way to use enums, advice to get me on the right track would be appreciated.
private enum TvMode{ TV, HDMI, HDMI1, Component;}
TvMode mode = TvMode.TV; // default mode
public static TvMode getTvMode(){
// return current state of mode
return mode;
}
public static void setTvMode(mode){
// set new value of mode
mode = TvMode.mode;
}
I may be a beginner but I can tell im doing it totally wrong. Thanks in advance~