Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

area of circle in java

import java.util.Scanner;
public class AreaOfCircle {
   public static void main(String args[]){
      int radius;
      double area;
      Scanner sc = new Scanner(System.in);
      System.out.println("Enter the radius of the circle ::");
      radius = sc.nextInt();
      area = (radius*radius)*Math.PI;
      System.out.println("Area of the circle is ::"+area);
   }
}
Comment

java create circle

// x position, y position, x size, y size.
ellipse(0, 0, 100, 100);
Comment

Area of a Circle in Java Programming

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        double R,A;
        Scanner sc = new Scanner(System.in);
        R = sc.nextDouble();
        A = 3.14159 * R * R;
        System.out.printf("A=%.4f
",  A);
   }
}
Comment

PREVIOUS NEXT
Code Example
Java :: java for each 
Java :: java add com.google.guava dependancy maven 
Java :: how to find the average in an arraylist 
Java :: get absolute path from relative java 
Java :: java print hex format 
Java :: return empty array from method 
Java :: reading csv file in java 
Java :: set intersection java 
Java :: how to convert string to boolean in java 
Java :: jframe visible 
Java :: how to print multiple things in one line java 
Java :: concatenate two arrays java 
Java :: split every character in string into array java 
Java :: java delete directory with files 
Java :: initialize arraylist in 1 line in java 
Java :: add stringarrays to string list java 
Java :: change number into array in java 
Java :: java replaceall regex 
Java :: java main method 
Java :: JAVA HashMap get keys by values 
Java :: android studio listview arrayadapter 
Java :: literals in java 
Java :: How to count the number of islands (groups of adjacent 1s) in a grid of 1s (land) and 0s (water), in Java? 
Java :: arrays.tostring java 
Java :: printing arraylist 
Java :: java restart while loop 
Java :: java add to map 
Java :: int array java 
Java :: How to connect from Android emulator to application on localhost? 
Java :: ternary operator in java for null check 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =