“A different language is a different vision of life.”
-- Federico Fellini
Home
Forum
Blog
Free Trial Class
More
package com.company; public class Main { public static void main(String[] args) { for(int i=2; i<9; i++) { System.out.println("10,000 at " + i + "% interest = " + String.format("%.2f", calculateInterest(10000.0, i))); } for(int i=0; i<6; i++) { System.out.println("Loop " + i + " hello!"); } } public static double calculateInterest (double amount, double interestRate) { return (amount * (interestRate/100)); } }
package com.company; public class Main { public static void main(String[] args) { for(int i=2; i<9; i++) { System.out.println("10,000 at " + i + "% interest = " + String.format("%.2f", calculateInterest(10000.0, i))); } for(int i=0; i<6; i++) { System.out.println("Loop " + i + " hello!"); } } public static double calculateInterest (double amount, double interestRate) { return (amount * (interestRate/100)); } }