/* Author : Michael Robinson Program : variables.java Purpose : To show the global and local variables Updated : May 4, 2099 */ public class variables { static double interestRate = 3.5; public static void firstLoan( int loanAmount ) { interestRate = interestRate + .25; System.out.printf( "I borrowed %d at %.2f interest.\n", loanAmount, interestRate ); } public static void secondLoan( int loanAmount ) { interestRate = interestRate + .25; System.out.printf( "I borrowed %d at %.2f interest.\n", loanAmount, interestRate ); } public static void thirdLoan( int loanAmount ) { interestRate = interestRate + .25; System.out.printf( "I borrowed %d at %.2f interest.\n", loanAmount, interestRate ); } public static void fourthLoan( int loanAmount ) { interestRate = interestRate + .25; System.out.printf( "I borrowed %d at %.2f interest.\n", loanAmount, interestRate ); } public static void main( String arg[] ) { firstLoan( 100 ); secondLoan( 200 ); thirdLoan( 300 ); fourthLoan( 400 ); int loanAmount = 500; interestRate = interestRate + .25; System.out.printf( "I borrowed %d at %.2f interest.\n", loanAmount, interestRate ); }//end public static void main( String arg[] ) }//end public class variables