import Mypack.Lab23;
class Circle
{
public static void main(String... Y)
{
Lab23 x=new Lab23();
x.m1(5);
}
}
package Mypack;
public class Lab23
{
public void m1(int r)
{
double pi=3.14,area; area=pi*r*r;
System.out.print("area of circle="+area);
} }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter