Page 1 of 1

Java.. need help

Posted: September 18, 2004, 6:11 pm
by Akaran_D
Ok. Taking a once a week college course, programming 1, using Java.My professor cannot explain many things well, and the books he's given us could have been nuke physics books in a previous life.

I've asked him about other books and the like to use as suplementary items. He can't recommend any, somthing about it may contradict the method he's been teaching or may use a different kind of java code to work with.

That being said, I think he's full of shit about the previous statement and I need help. ><

Type of programs we're writing include this gem that's straight out of my lab book. Any advice as towards a publication (book, website) that can help would be more than appericated.

Code: Select all

import java.io.*;
public class TestMessage
{

static class Message
{
  String name;
  String message ;
  BufferedReader in;
  // Class methods follow.

      public void getName() throws IOException
{
  in = new BufferedReader(new InputStreamReader(System.in));
  System.out.println("Enter name:");
  name = in.readLine();
}

  public void getMessage() throws IOException
{
  System.out.println("Enter message:");
  message = in.readLine();
}



public static void main(String [] args) throws IOException
{
  Message  text;
  text = newName;
  text.getName();
  text.getMessage();
  text.printMessage();
}


   public void printMessage()
{
  System.out.println("Hello " + name);
  System.out.println(message);
}

}
}
[/code]

Posted: September 18, 2004, 8:19 pm
by XunilTlatoani
I use this book from time to time:

http://www.amazon.com/exec/obidos/ASIN/ ... 02-8368865

But when I'm coding every day, I usually have the Java API web page open at all times.

http://java.sun.com/j2se/1.4.2/docs/api/index.html (obviously, you'll want to look at the API you are coding for at the time).

Here's a good learning site as well:

http://java.sun.com/developer/onlineTraining/

In other words, I think Sun does a good job in product training and reference by itself :)

Posted: September 18, 2004, 8:26 pm
by Akaran_D
WOOT, thank you.

Posted: September 19, 2004, 3:15 am
by Lynks
I used Sun's site for my Java course, it was the best online help you can get. A great book to get also is Java 2 Primer Plus.

Posted: September 20, 2004, 4:51 pm
by Tenuvil
I found a book called "Thinking in Java" by Bruce Eckel a good resource for someone new to Java and the syntax of the language. Apparently the author provides this for free in ebook format, here's a link.

Posted: September 21, 2004, 1:50 pm
by Sylvus
Thinking in Java is pretty good, I have that right here on my desk.

I also like Java 2: The Complete Reference.

The APIs are an invaluable resource, though they might be a bit unwieldy if you're just trying to learn Java.