Total noob here, i'm getting an error
I'm trying to run the code below in Eclipse and I'm getting the error message "Selection does not contain an applet" if I run it as an applet, and "Selection does not contain a main type" if I run it as an application. How do I fix this? I'm entirely new to java (only've done PHP and javascript, if those even count), so extra detail is more than welcome.
Code:
Code:
package svidler.net;
public class Cube {
//fields
int length;
int breadth;
int height;
public int getVolume(){
return (length * breadth * height);
}
}
cubeObject.length = 4;
cubeObject.breadth = 4;
cubeObject.height = 4;
cubeObject.getvolume();
Screenshots:
http://i367.photobucket.com/albums/o...8at73149PM.png
http://i367.photobucket.com/albums/o...8at73133PM.png