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 web.config in .net?

671


Difference abstract class and interface in .net?

691


Explain how viewstate is being formed and how it's stored on client in .net?

630


What is garbage collection? Explain the difference between garbage collections in .net 4.0 and earlier versions?

776


What are the authentication methods in .net?

647






Write the .net syntax for 'while loop'?

662


What are the advantages of .net core?

623


Explain me why do we use msmq?

650


Explain what is reflection in microsoft .net context?

645


Compare client server application with n-tier application

599


What operating systems does the .net framework run on?

655


Difference between dispose and finallize method?

779


How to manage pagination in a page using .net?

650


What's singleton activation mode in .net?

705


What is common type system (cts)?

641