I'll be amazed if you are still looking for the answer to this problem. Hope this helps.
import java.util.*;
public class investment {
public static void main(String[] args) {
double intEarned;// just use these for your variables, no a/b/c needed
double inteValue;//you dont need newInves, just change inteValue.
double interestRate = 10;// interest rate as variable so it is easier to
// change
int years = 5;// make the years an easily changed variable
Scanner keyboard = new Scanner(System.in);
// this where we input the value
System.out.print("Enter your Invesment Value:");
inteValue = keyboard.nextDouble();
System.out.println("year interest Earned Investment Value");
System.out.println("---- --------------- -----------------");
for (int i = 0; i < years; i++) {// for loop controls the counter for you so you dont have to worry about it
intEarned = inteValue * (interestRate / 100);
inteValue = inteValue + intEarned;
System.out.print((i + 1));
System.out.printf(" $%.2f", intEarned);// formated output for 2 decimal places
System.out.printf(" $%.2f%n", inteValue);
}
}
}