I am just beginning my journey to becoming a Java programmer. I bought the beginner's guide book to facilitate my educational journey. I have come to a point where the code listed in the book brings about errors in my programming enviornment even before I run the code. I am using "Eclipse" as my programming enviornment.
I created a new project call "Coder". This project has two classes, "World" and "Coder". The initialize method is a problem and calling upon the initialize method in the "Wold" class is a problem...for some reason.
Can someone tell me what I am missing? In the "World" class, the [c.initialize ("Bill, 59")] is a problem, why? How else would I write this and why would this suggestion work. Why does what I wrote not work?
public class Coder {//start Coder class private String name; private int age; private void initialize (String name, int age) {//start initialize method this.name = name; this.age = age; }//end initialize method public void writeCode() {//start writeCode method System.out.println (name + " is coding!"); }//end writeCode method public void describe() {//start describe method System.out.println ("I am a coder"); System.out.println ("My name is " + name ); System.out.println (" I am " + age + "years old"); }//end describe method }//end Coder class