What are the differences between public, private, protected,
static, transient, final and volatile?

Answers were Sorted based on User's Feedback



What are the differences between public, private, protected, static, transient, final and volatile?..

Answer / nikunj

Public : access anyware in script
Protected: access only same class and access inherited class
Private: access only in same class
Final: restrict overriding with child class

Is This Answer Correct ?    59 Yes 3 No

What are the differences between public, private, protected, static, transient, final and volatile?..

Answer / naresh

in object by default all variables are presistent. so some
time we want to avoid that variables means we use transient
for that variable.

Is This Answer Correct ?    5 Yes 8 No

What are the differences between public, private, protected, static, transient, final and volatile?..

Answer / bharanikumar

can u plz give me more informa for protected

Is This Answer Correct ?    2 Yes 11 No

Post New Answer

More PHP Interview Questions

Why many companies are switching their current business language to php?

0 Answers  


How do you count numbers in php?

0 Answers  


What is array filter php?

0 Answers  


/temp is a type of filesystem directory. State Whether True or False?

0 Answers  


Which function would you use to insert a record into a database in php?

0 Answers  


Tell me what are the encryption techniques in php?

0 Answers  


How to remove blank spaces from the string?

0 Answers  


Explain soundex() and metaphone().

0 Answers  


How to get complete current page url in php?

0 Answers  


Is it more secure to use cookies to trfer session ids?

0 Answers  


What is associative array in php?

0 Answers  


What is the difference between php 5 and php 7?

0 Answers  


Categories