Please explain how this bit of code works.
This is a code I wrote for Fundamental Java as an assignment. I wanted to round up the quotient of d and c and I found the answer on this website. But my question is how does the code that is colored red work? Thank you in advanced,
Allspark
//Allspark
public class Lab02_Ex2
{
final static int A = 7, B = 8;
final static double C = 4.23, D = 5.89;
public static void main(String [] args)
{
double dbl = D / C;
int x = (int)(dbl * 100.0); // Scale it
double dbl2 = ((double)x) / 100;
System.out.println( A + " + " + B + " = " + (A + B));
System.out.print( A + " * " + B + " = " + (A * B) + "\n");
System.out.println( B + " - " + A + " = " + (B - A));
System.out.println( D + " / " + C + " = " + dbl2);
System.exit(0);
}