Answer:
Follows are the code to the given question:
import java.util.*;//import package for user-input
public class AnnualIncome // defining a class AnnualIncome
{
public static void main(String[] as)//defining main method
{
double income;//defining double variable
Scanner obx=new Scanner(System.in);//creating Scanner class for user-input
System.out.print("Please enter your desired annual income: ");//print message
income=obx.nextDouble();//input double value
System.out.println("Your income "+income);//print value
}
}
Output:
Please enter your desired annual income: 98659.89
Your income 98659.89
Explanation:
In this code, a class "AnnualIncome" is declared, and inside the main method, the double variable "income" is defined, that uses the scanner class concept for input the value from the user-end, and in the next step, it uses the print method for asked user to enter value and it uses the print method, that prints income value with the given message.