PRJ301_-_FA_2023_-_FE_1060.webp
Haruta871

PRJ301_-_FA_2023_-_FE_1060.webp

(Choose 1 answer)
A. It will throw an exception at request time because "1000" is a string and isbn is a long.
B. The isbn property of newbook will be set to 1000.
C. It will not compile.
D. The isbn property of newbook will be set to 1000 if  'value' attribute of 'setProperty' tag is given as: value=1000
Finish
Consider the following java code:
//in file Book.java
package com.bookstore;
public class Book
{
private long isbn;
public Book(){ isbn = 0; }
public long getIsbn(){ return isbn; }
public void setlsbn (long value){ this.isbn= value; }
}
Code for browse.jsp:
<jsp:useBean class="com.bookstore.Book" id="newbook" />LINE 1: <jsp:setProperty name="newbook" property="isbn" value="1000"/>
Which of the following statements are correct?
Exit 34

Thông tin

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

Image metadata

Filename
PRJ301_-_FA_2023_-_FE_1060.webp
File size
53.6 KB
Dimensions
1286px x 546px

Share this media

Back
Bên trên Bottom