cool hit counter
Cafe4Java
Cafe4Java
 

SCWCD Mock Exam
Q1)
Examine the following code and select the correct options:

public class ProductBean implements java.io.Serializable {
	private String productName;
	private int quantity;

	public void setName (String newVal) { productName = newVal; }
	public String getName () { return productName; }

	public void setWeight (int newVal) { quantity = newVal; }
	public int getWeight () { return quantity; }
}

  • A) ProductBean defines two properties.
  • B) ProductBean defines one readable property 'name'.
  • C) ProductBean defines one writable property 'name'.
  • D) ProductBean defines one readable property 'productName'.
  • E) ProductBean defines one writable property 'productName'.
  • F) ProductBean defines one readable and writeable property 'weight'.
  • G) ProductBean defines one readable and writeable property 'quantity'.
  • H) ProductBean is not a valid JavaBean because it does not defines a public no-argument constructor.
Answer to Q1


>>>> Go to Q2 >>>>

Submit your feedback on this mock exam