I'm fairly new to coding and I've been learning by creating simple programs.
I'm trying to create a program called roundGrade to round a grade to one decimal place by calling onto the command line.
The error stated:
Error: variable roundGrade might not have been initialized
Here's the code I've written so far:
public static String roundGrade(double grade){
    String roundGrade;
    double R = Double.parseDouble(roundGrade);
    R = Math.round(grade*10)/10;
    roundGrade = Double.toString(R);
    return roundGrade;
}
 
     
    