Give an example for setter/ write-only methods

Answer Posted / hrindows@gmail.com

// A write-only class in Java
public class Student{
//private data member
private String institute;
//setter method for institute
public void setInstitute (String institute)
{ this.institute=institute;
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a formatter in .net?

580


What is manifest in .net?

612


What's a windows process in .net?

544


What are the purposes of using .net?

610


What tags do you need to add within the asp:datagrid tags to bind columns manually.

1489






Is .net an object oriented language? What are their components?

530


How do you instantiate a complex number?

597


What are Satellite Assemblies? How you will create this? How will you get the different language strings?

1582


Explain About GDI object ?

620


What is assemblies in .net?

634


Explain what are an object and a class?

572


Explain what rare the types of jit and what is econo-jit?

525


What are the security policy levels in .Net

1576


What is RPC? What is the use of it?

614


What is the difference between encrypting a password and applying a hashing?

617