Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
(1 vote)
- /*
- * Simple Interest Calculation in Java
- */
- import java.io.*;
- class SimpleInterestCalculation{
- public static void main(String s[]){
- float p=0f;
- float r=0f;
- int n=0;
- float si = 0.0f;
- String s1;
- DataInputStream d1 = new DataInputStream(System.in);
- try{
- System.out.print("Enter Principal Amount: ");
- s1 = d1.readLine();

