says im Missing }..?

hello everyone, i just joined these forums. um...i just started learning java today, and i figured out how to use the compiler, but my code seems to me wrong.... can anyone see any errors? its from a book, its the first lesson:P...

class volcanorobot

{

String status;

int speed;

float tempature;

void checktempature(){

if (tempature > 660){

status = "returning home";

speed = 5;

}

}

Void showattributes(){

System.out.println("Status " + status);

System.out.println("Speed: " + speed);

System.out.println("Tempature " + tempature);

}

public static void main(String[] arguments)

{

volcanorobot dante = new volcanorobot();

dante.status = "exploring";

dante.speed = 2;

dante.tempature = 510;

dante.showattributes();

System.out.println("increasing speed to 3.");

dante.speed = 3;

dante.showattributes();

System.out.println("changing tempature to 670");

dante.tempature = 670;

dante.showattributes();

System.out.println("checking the tempature");

dante.checktempature();

dante.showattributes();

}

}

thanks!!, and i'll be back!!...lol

[1283 byte] By [Booooze] at [2007-9-30 11:24:36]
# 1

First - format your reply. See [url=http://forum.java.sun.com/faq.jsp#format]this[/url]

Second - while I can not see anything that should give rise to the error you are getting, there are a couple

of problems that leap out

1. class names by convention start with an uppercase letter, with upper case used for each new word (so your clss name would be VolcanoRobot)

2. your method showattributes returns Void - where it should be void

3. If you want to access the class variables status, speed and temperature from the main, you will need to make them static, or privide "getter" and "setter" methods (the latter is normally preferred)

EvilEdna at 2007-7-4 1:07:30 > top of Java-index,Administration Tools,Sun Connection...
# 2

well, i fixed it....thanks to you:D...the things you pointed out were the problem. the reason i made it that way is because i wanted it all to be lowercase, but i now realise that java is case sensitive. anyways thank you very much! and ill remember the other stuff you said to;)..Thank you

Booooze at 2007-7-4 1:07:30 > top of Java-index,Administration Tools,Sun Connection...
# 3

the corrected version is below

public class VolcanoRobot

{

String status;

int speed;

float tempature;

void checktempature()

{

if (tempature > 660)

{

status = "returning home";

speed = 5;

}

}

void showattributes()

{

System.out.println("Status " + status);

System.out.println("Speed: " + speed);

System.out.println("Tempature " + tempature);

}

public static void main(String[] arguments)

{

VolcanoRobot dante = new VolcanoRobot();

dante.status = "exploring";

dante.speed = 2;

dante.tempature = 510;

dante.showattributes();

System.out.println("increasing speed to 3.");

dante.speed = 3;

dante.showattributes();

System.out.println("changing tempature to 670");

dante.tempature = 670;

dante.showattributes();

System.out.println("checking the tempature");

dante.checktempature();

dante.showattributes();

}

}

type the following commands for compiling it.

javac VolcanoRobot.java

and to run the program

java VolcanoRobot

taruniiitb at 2007-7-4 1:07:30 > top of Java-index,Administration Tools,Sun Connection...
# 4
> the corrected version is belowHave you tried this taruniiitb? If so, you either have a very old compiler, you are some sort of deity, or yoe are not very observant.
EvilEdna at 2007-7-4 1:07:30 > top of Java-index,Administration Tools,Sun Connection...