Here is the commented code, please answer these questions for me and we can proceed from there:

Code java:

publicstaticvoid main(String[] args){//This is a variable that you immediately garbage collectingnew Scanner(System.in);//Why do you have the previous line if you have this?
Scanner input =new Scanner(System.in);//Why a float?float square;System.out.println("Enter a number.");//Where do you get the number the user enters?System.out.println("Select 1 for square or 2 for cube: ");//Is this supposed to be 1 or 2 or the number the user entered?
square = input.nextFloat();//Why greater than or equal to 2?if(square>=2){//Why multiply by 2?System.out.println(square*2);}else{//Why didn't you finish this line of code?System.out.println(square +"
}
}