hi,
i'm very new to java so am going to ask a couple of really silly questions:
1) I have a simple program I wrote that uses soem maths functions : eg Math.cos and Math.sin. I was under the impression that I did not need to include anything for these to work. Indeed I compiled and ran these on my laptop. but then when I tried to compile same source on another machine, the compiler complained that it didn know what Math.cos was!! is this something to do with a wrong CLASSPATH settign?
2) I have done a bit of C++ int he past and rememebr the concep or passing an object either as a copy, as a pointer or by reference. - ie. either creatign a copy of an object in the called procedure that does not then effect the original object, or making that the actions perfomed in the procedure happen to the actual object (not a copy). How does this work in java - I am aware that java got rid of pointers, but how does it treat a passed object - does it trat it as a new 'local' copy in the procedure or does it reference the original object?
i'm very new to java so am going to ask a couple of really silly questions:
1) I have a simple program I wrote that uses soem maths functions : eg Math.cos and Math.sin. I was under the impression that I did not need to include anything for these to work. Indeed I compiled and ran these on my laptop. but then when I tried to compile same source on another machine, the compiler complained that it didn know what Math.cos was!! is this something to do with a wrong CLASSPATH settign?
2) I have done a bit of C++ int he past and rememebr the concep or passing an object either as a copy, as a pointer or by reference. - ie. either creatign a copy of an object in the called procedure that does not then effect the original object, or making that the actions perfomed in the procedure happen to the actual object (not a copy). How does this work in java - I am aware that java got rid of pointers, but how does it treat a passed object - does it trat it as a new 'local' copy in the procedure or does it reference the original object?