Give an example for setter/ write-only methods



Give an example for setter/ write-only methods..

Answer / 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

More Dot Net General Interview Questions

Explain About GDI object ?

0 Answers   TISL,


What is the difference between Dataset and DataReader? Can u breif me ADO.net classes and architecture

2 Answers   Deloitte,


Differentiate between managed and unmanaged code?

0 Answers  


Is there any inbuilt tool or command provided by .NET to view the code inside the assembly?

0 Answers   CitiusTech,


What is difference between .net core and .net standard?

0 Answers  






i have an array of 10 objects whose values are from 1-10 randomly inserted. i have deleted one array object. tell me what is that value? write the logic of it.

2 Answers   Deloitte, Srp Khanij,


Explain the garbage collection process?

0 Answers  


What is dot net and its uses?

0 Answers  


What is the microsoft .net?

0 Answers  


Explain how to stop a thread?

0 Answers  


What?s Singleton activation mode?

1 Answers  


Can you write a class without specifying namespace?

0 Answers  


Categories