NetBeans Calculator

Java NetBeans is an IDE (Integrated development environment) to create Java apps for mobile and desktop and also HTML5 and HTML codes. It also comes with a variety of tools for PHP, C and C++ languages. By learning simple basics you can create many useful apps such as calculators using Java Net beans. In this post we are going to tell you some simple steps and codes to make a simply NetBeans calculator.

how to make netbeans calculator

How to make NetBeans Calculator?

It is not very difficult and all you have to do is to follow the simple steps though codes might seem difficult but no worries you can do it.

  1. First of all you need Java Net Beans which you can download easily by searching on Google and install it.
  2. Select ‘New Project’, rename it as ‘Calculator’ and let the setting remain on default since we don’t need anything special for our project.
  3. Now here comes the major thing i.e. coding. Well this isn’t very difficult and you can do it even being a beginner but make sure that you follow and do it right because even a single comma that’s missing can ruin the whole thing.

For starters your code should look like this,

import java.util.Scanner;
public class Calculator {

Now click behind the second to last bracket in your code and hit return a couple of times. Now click at the end of the green code that says // TODO code application logic here, hit return and type:
Scanner scan = new Scanner(;
int Tommy = scan.nextInt();
double Bob = scan.nextDouble();

You can do a little trick to get rid of the error by typing ‘SOUT’ and hitting tab will automatically convert it to this code System.out.println(“”);.

Now all that’s remaining is to run your project and try out different calculations. 8×8 should be 64 LOL!

Go and try out making this app easily and use it for your better!

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *