• Like
Class  Static Circle
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Class Static Circle

  • 148 views
Published

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
148
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
3
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. class StaticCircle { public double radius; double pi=3.14; public void circle(double radius) { this.radius=radius; } public double area() { double a = radius*radius; double piValue= a*pi; return piValue; } public static void main(String[] args) { StaticCircle staticCircle = new StaticCircle (); staticCircle.circle(10); double i = staticCircle.area(); System.out.println("The area is " + i); } }