Subtraction java programming
Open netbeans and open new frame.
Put the components from pallet to jFrame as given below
- Open source code window by double clicking on button.
- Write the code as given below
- Handling with numbers we us either short as short or long as long or integer as it.
- We have use int.
- Integer.parseInt is a code us for coding a number.
- a and b at variables use to type number while c is used to store the the value of a and b and also to show result.
- - sign is use between a and b for the subtraction.
- After completing it ,run the program and see what happens.
No comments:
Post a Comment