PRO192_-_FA_2023_-_FE_1027.webp
Erza_girl

PRO192_-_FA_2023_-_FE_1027.webp

(Choose 1 answer)
Given that you have a method scale defined as follows, where scalex and scaley are int constants:
A. The compiler objects to line 1.
B. The program compiles but a runtime cast exception is thrown.
C. A compiler error occurs in line 3.
D. The program compiles and runs.
public Point scale(int x, int y ){
return new Point(
(int)(x/scalex),
(int)(y/scaley));
}
What will happen when you call this method with double primitives instead of int, as in the following fragment?
1. double px = 10.02;
2. double py = 20.34
3. Point thePoint = scale( px, py);


Thông tin

Category
PRO192
Thêm bởi
Erza_girl
Ngày thêm
Lượt xem
4,109
Lượt bình luận
23
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRO192_-_FA_2023_-_FE_1027.webp
File size
57.9 KB
Dimensions
1542px x 690px

Share this media

Back
Bên trên Bottom