Originally posted by: MartyMcFly3
Hey also a noob here.. for class we are supposed to write an expression for the following:
set the value of a to the remainder of b divided by c if b*c is greater than a*c or if y is true. Otherwise, set the value of a to b*c, increment c and set the value of z to false
I have come up with:
If (b*c>a*c) a=b%c
If (y=true) a=b%c
Else
and im stuck with the rest. Im not sure if what I even have is right. The guy sucks at teaching the course so its been a struggle for me.
Originally posted by: trance
yeah I"m installing the JSDK
I told you guys I am a n00b.
Originally posted by: kamper
Originally posted by: trance
yeah I"m installing the JSDK
I told you guys I am a n00b.
And back to the original post: when you do get javac to work you will see a file called Hello.class in the same folder as your java file. This is the compiled output and will always have the same name as the java file (until you start putting multiple classes in one file but that's another story ). When you say "java Hello" it looks for that class file and tries to run it.
Originally posted by: kamper
Anonymous inner classes don't get their own file do they? And what's wrong with the naming?
Originally posted by: amdfanboy
Originally posted by: kamper
Anonymous inner classes don't get their own file do they? And what's wrong with the naming?
They sure do. They get names like Class$1 and things like that.
Originally posted by: kamper
Originally posted by: amdfanboy
Originally posted by: kamper
Anonymous inner classes don't get their own file do they? And what's wrong with the naming?
They sure do. They get names like Class$1 and things like that.
Right you are. So what are your suggestions for the naming?
Originally posted by: kamper
Anonymous inner classes don't have names, non-anonymous classes do have the class names as part of the filename. I figure it's just the most straightforward way for the compiler and classloaders to communicate which class file should be used when needed. It's not like humans have to deal with them much.