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

How to implement datagrid in.net? How would you make a combo-box appear in one column of a datagrid? What are the ways to show data grid inside a data grid for a master details type of tables? If we write any code for datagrid methods. What is the access specifier used for that methods in the code behind file and why?

798


Different between .net & j2ee ?

819


Explain the differences between server-side code and client-side code.

798


Explain the process of compilation in .NET?

875


Explain why do we use the “using” statement?

832


Describe the Managed Execution Process

1888


What are the advantages of .net?

770


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

850


What is the difference between a class and an object, and how do these terms relate to each other?

805


What is the use of gacutil.exe?

902


How is a managed code executed?

1069


How do you instantiate a complex number?

829


What are the differences between com architecture and.net architecture?

801


What are the new features in .net core?

811


What are code contracts?

831