Friday, 6 April 2012
Tuesday, 3 April 2012
What is encapsulation?
- It is the fundamental principle concept of oops.
- It hides the data from outside the world.
- You can also say that it is the process of hiding internal data from outside the world.
- It gives maintainability, flexibility and extensibility to our code.
- It gives the ability to hide the data and method fro m out side the world and only expose data and method that are required.
- it also hide the information from the object.
Class Employee
{
private int _employeeId;
private double _salary;
public int SetEmployeeId(int EmpId)
{
_employeeId=EmpId;
}
public int GetEmployeeId()
{
return _employeeId;
}
public double SetEmployeeSalary(double Salary)
{
_salary=Salary;
}
public int GetEmployeeSalary()
{
return _salary;
}
What is Difference between Web Browser and Web Server.
Web browser: A software application that is used for retrieving,presenting and transferring the data from the internet(world wide web).
Example: Internet explorer,Mozilla,Google chrome etc.
Web Server: It is a program on a server computer, somewhere on the world wide web, that deliver a web pages on the computer.
What is boxing and Unboxing.
Converting a value type data to reference type is called boxing;
UnBoxing: It is the reverse of Boxing i.e converting a reference type value to value type;
Ex: int x=1;
Object ob=x;//boxing
int x=(int)x;//UnBoxing
Subscribe to:
Posts (Atom)