hi guys i am just starting out in java and it is my first coding language so i am a complete novice. on thing i cant get me head around is everything seems to be numerical. If i wanted to say write a simple program where the user is asked to type in there favorite color How would i go about returning a different message for each colour ?
Ultimately, the computer can only deal with numbers (if you look at a really low level, it only works with bits which can be 0 or 1). But in the Java programming language not everything is necessarily just numbers. You can use strings to work with text.
Have you come across the switch statement? Since Java7 it has been possible to work with Strings:-You can create a Map which can store names and addresses, but Maps are probably more advanced than you are after a few weeks.