I just created a Calculator API in java. Here I am describing step by step.
|
Creating a java project |
|
Creating a package |
|
java package |
|
Creating a java class under that package |
Step 1: First of all I created a java project in eclipse and named it Calculator API. Then I created
a package and named it
sagor.calculator.CalculatorAPI
Under this package I created a class and named it
Calculator and did some method that a calculator consist. Such as addition, subtraction, multiplication, division, remainder, square root etc.
Step 2: I exported this project as jar file and save it on my drive. I saved it on my desktop.
|
Exporting that project |
|
Exporting that project as JAR |
Step 3: Then Created a new java project and under properties>Java Build path> Libraries uploaded this file as External jar file and hit ok.
|
Properties>java Build Path> Libraries |
Step 4: Now run this test code.
No comments:
Post a Comment