Use of more than one class in a java program.

class Room
{
float len,brd;
void getdata(float x,float y)
{
len=x;
brd=y;
}
}
class CalArea
{
public static void main(String args[])
{
float area;
Room obj=new Room();
obj.getdata(10,15);
area=obj.len*obj.brd;
}
}
OUTPUT
Thanks..I will add a big collection of useful java tutorials ASAP
ReplyDeletethus in java programming is really nice and informative thanks for sharing your precious values it will be useful for many others.
ReplyDeletesas training in chennai
Well Said, you have furnished the right information that will be useful to anyone at all time. Thanks for sharing your Ideas.
ReplyDeleteSAS Training in Chennai | SAS Course in Chennai