PRO192_-_C1_-_FE_-_SU_2023_391.webp
H

PRO192_-_C1_-_FE_-_SU_2023_391.webp

OD
(Choose 1 answer)
Given the following code, what will be the outcome?
10. public class Funcs extends java.lang.Math {
11. public int add(int x, int y) {
12. return x + y;13. }
14. public int sub(int x, int y) {
15. return x - y;
16. }
17. public static void main(String[] a) { 18. Funcs f = new Funcs();
19. System.out.println("" + f.add(1, 2) + " " + f.sub(3,4));
20. }
21. }
A. The code compiles but does not output anything.
B. "3-1" is printed out to the console.
C. The line 10 causes compile-time error.
D. "3 1" is printed out to the console.
Exit (11

Thông tin

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

Image metadata

Filename
PRO192_-_C1_-_FE_-_SU_2023_391.webp
File size
66.9 KB
Dimensions
1713px x 893px

Share this media

Back
Bên trên Bottom