Q:

Java - Method concept

0

This Program is used to demonstrate the method concept.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

class area 
{ 
int b=10; 
int h = 5; 

void calc() 
{ 
int x; 
x = b*h; 
System.out.println("Area : "+x); 
} 

public static void main(String arg[]) 
{ 
area a = new area(); 
a.calc(); 
} 
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now