How to Calculate Circle Area using Java

How to Calculate Circle Area using Java

Previous post we learnt how to use System.in java method.Today we are going to calculate circle area using certain Java functions.


Calculating Circle Area using java 

Start your IDE and type below code.
[
import java.io.BufferedReader;
import  java.io.IOException;
import java.io.InputStreamReader;
public class CircleArea {

    public static void main(String args[])
    {
        int circleRadius=0;
        System.out.println("Enter Radius of the Circle");
        try        {
            BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));

            circleRadius=Integer.parseInt(reader.readLine());
        }
        catch(NumberFormatException e1)
        {
            System.out.println("Invalid Radius Entered" + e1);
            System.exit(0);
        }
        catch(IOException e2)
        {

            System.out.println("Input Output Error :" + e2);
            System.exit(0);
        }

        double circleArea=Math.PI* circleRadius*circleRadius;


        System.out.println("The circle Area with Radius of "+circleRadius+" is "+circleArea);



    }





}



COMMENTS

Name

android android Apps android emulators antivirus blogger bluestack Break Statement in Java constructors download downloader drivers emulators java java control statements java do-while loop java for loop java infinitive do-while loop java system methods java tutorials Java While Loop java.awt java.swing javalookandfeel javascript JButton JCheckBox JColorChooser JComboBox JDialog JFileChooser JFrame JLayeredPane JList JMenuBar joomla JOptionPane JPanel JPasswordField JPopupMenu JProgressBar JRadioButton JScrollBar JSlider JSpinner JTabbedPane JTable JTextArea JTextField JToolBar mysql php plugins Polymorphism setToolTiptext skype for windows software swing class themes Visual Studio Code WeChat whatsapp wordpress
false
ltr
item
Java Codes: How to Calculate Circle Area using Java
How to Calculate Circle Area using Java
How to Calculate Circle Area using Java
Java Codes
http://www.download-all.net/2017/02/how-to-calculate-circle-area-using-java.html
http://www.download-all.net/
http://www.download-all.net/
http://www.download-all.net/2017/02/how-to-calculate-circle-area-using-java.html
true
7826648292785071009
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy