answersLogoWhite

0

public class CircleDiameter { publicCircleDiameter() { super(); } publicfloatgetDiameterFrmRadius(float radius){ return radius * 2; } /** * @param args */ public static void main(String[] args) { float radius = 5; CircleDiameter circle = newCircleDiameter(); float dia = circle.getDiameterFrmRadius(radius); System.out.println("Diameter of this circle is: " + dia); } }

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Write a java code to draw a circle inside in an ellipse?

write a program draw circle and ellipse by using oval methods in java


Can you get a Java program to find the cube of a number?

Yes


What do you mean by multithread program in java?

A Program in Java that spawns multiple threads is called a multithreaded program in Java.


How do you write a java program to find the ad joint of a matrix?

bgfygfrhjyuyhh


Write a menu driven program in java to find area of different shapes. 1. Circle 2. Triangle 3. Rectangle?

Remember that the area of a rectangle is width * height: static int getArea(Rectangle r) { return r.width * r.height; }


How do you write a java program for finding multiligual languages?

You can use Java's built-in functions to write a code that will find multilingual languages.


What is java program on computers?

#!/usr/bin/perl print 'java program';


What is java virtucal mechine?

That refers to the program that runs the compiled Java program.


Where can someone find information on the Java language for no such method error be found?

"No such method" is an error message that may appear when attempting to create a program with Java. Users who understand the Java programming language can find an answer on websites such as Stack Overflow and Crafting Java.


Jntu 2-2 oops through java answers?

write a java program to find factorial using recursive and non recursive


How do you write a java program to find the square root of a number?

You can use the Math.sqrt() method.


What powder game doesnt need java?

Any program written for the Java technology needs Java. Any program NOT written for Java DOESN'T need it.