Java.. need help

Support, Discussion, Reviews
Post Reply
User avatar
Akaran_D
Way too much time!
Way too much time!
Posts: 4151
Joined: July 3, 2002, 2:38 pm
Location: Somewhere in my head...
Contact:

Java.. need help

Post 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]
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
User avatar
XunilTlatoani
Star Farmer
Star Farmer
Posts: 379
Joined: September 6, 2002, 2:37 pm
Location: Lakemoor, IL

Post 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 :)
Xunil Tlatoani - Gnome Arch Lich (Retired)
Keepers of the Elements

Tlatoani - Gnome Warlock
Light of Dawn (Lightbringer Server)
User avatar
Akaran_D
Way too much time!
Way too much time!
Posts: 4151
Joined: July 3, 2002, 2:38 pm
Location: Somewhere in my head...
Contact:

Post by Akaran_D »

WOOT, thank you.
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
Lynks
Way too much time!
Way too much time!
Posts: 2774
Joined: September 30, 2002, 6:58 pm
XBL Gamertag: launchpad1979
Location: Sudbury, Ontario

Post 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.
User avatar
Tenuvil
Way too much time!
Way too much time!
Posts: 1841
Joined: July 11, 2002, 6:13 pm

Post 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.
User avatar
Sylvus
Super Poster!
Super Poster!
Posts: 7033
Joined: July 10, 2002, 11:10 am
Gender: Male
XBL Gamertag: mp72
Location: A², MI
Contact:

Post 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.
"It's like these guys take pride in being ignorant." - Barack Obama

Go Blue!
Post Reply