No, you're making a classic mistake: Java trig functions need radians, not degrees. It's not 90 that you should pass; it's π/2.0.
So be sure to convert angles in degrees to radians by multiplying by π/180.0.
This is true for C, C++, Java, JavaScript, C#, and every other language I know. I cannot name a single language that uses degrees for angles.
double radians = dir*Math.PI/180.0;
x += (int)(spd*Math.cos(dir));
y -= (int) (spd * Math.sin(dir));` // I don't know why you do this. Funny left-handed coordinate system.
Speed is the magnitude of the velocity vector. The equations, as written, only express velocity as (vx, vy) components.
If you want displacements, you'll have to multiply by a time step:
vx = speed*Math.cos(angle);
vy = speed*Math.sin(angle);
dx = vx*dt;
dy = vy*dt;
x += dx; // movement in x-direction after dt time w/ constant velocity
y += dy; // movement in y-direction after dt time w/ constant velocity
If there's acceleration involved (e.g. gravity), you should calculate the change in velocity over time the same way.