You code contains lot of weird thing i don't know why you are using the for loop and your IF condition is completely weird.
It seems like you are trying to take two value and wants to display the cube of both the numbers and the largest of the two numbers. You can't do that without using the for loop at all.
public static void main(String args[]) {
double num1;
double num2;
Scanner scan = new Scanner(System.in);
System.out.println("Please enter 2 numbers:");
num1 = scan.nextDouble();
System.out.println("cube of" + num1 + "is" + num1 * num1 * num1);
num2 = scan.nextDouble();
System.out.println("cube of" + num2 + "is" + num2 * num2 * num2);
if (num1 > num2) {
System.out.print("The largest number is" + num1);
} else
System.out.print("The largest number is" + num2);
}