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 UDDI and how to register the web service in it?

823


What are asp.net authentication providers and iis security?

759


What are the challenging issues you have faced in implementation project/Maintainance project in .net Functionality? How you have overcome that issue?

4833


How do you generate a strong name?

821


What is a .DLL and .EXE files called in .NET?

839


State the differences between the dispose() and finalize().

798


why you wouldn't want to write into it even if you could

809


What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

755


What’s different between process and application in .net?

819


What is the intermediate language between asp and asp.net1.0?

1675


What is interface and abstract class in .net?

781


What is implement a generic action in webapi?

964


What are the different.net tools which you used in projects?

747


Do you know what is garbage collector?

797


What is the difference between a namespace and assembly name in .net?

745