PRJ301_-_SP_2024_-_RE_1764.webp
M

PRJ301_-_SP_2024_-_RE_1764.webp

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?
A. The isbn property of newbook will be set to 1000.
B. It will throw an exception at request time because "1000" is a string and isbn is a long.
C. It will not compile.
D. The isbn property of newbook will be set to 1000 if&nbsp;&nbsp;'value' attribute of 'setProperty' tag is given as: value=1000


8
  • Like
Reactions: seloena

Thông tin

Category
PRJ301
Thêm bởi
Mỹ Duyên2
Ngày thêm
Lượt xem
2,731
Lượt bình luận
31
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRJ301_-_SP_2024_-_RE_1764.webp
File size
79.4 KB
Dimensions
1926px x 906px

Share this media

Back
Bên trên Bottom