CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 85: GSSP-Java: GIAC Secure Software Programmer-Java

What will happen when you try to compile and execute the following code? class strconcat {public static void main(String args[]){String str =" Correct answers";String perc ="a"+"b";System.out.println(80+ '%' + str);}}Note. The ASCII value of % is 37.

Nội dung câu hỏi

What will happen when you try to compile and execute the following code? class strconcat {public static void main(String args[]){String str =" Correct answers";String perc ="a"+"b";System.out.println(80+ '%' + str);}}Note. The ASCII value of % is 37.

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. It will compile and execute successfully and will print 80 Correct answers as the output.
  2. B. It will compile and execute successfully and will print 117 Correct answers as the output. — đáp án hiện tại
  3. C. It will compile and execute successfully and will print 80% Correct answers as the output.
  4. D. It will fail to compile because % cannot be concatenated to a string.

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề