Notifications
Clear all
What is a scope resolution operator?
Students’s Forum
3
Posts
4
Users
2
Likes
375
Views
0
06/04/2023 9:58 am
Topic starter
What is a scope resolution operator?
Answer
Add a comment
riyaponraj 07/04/2023 10:28 am
@jisha-c The scope resolution operator :: is used to identify and disambiguate identifiers used in different scopes.
Add a comment
2 Answers
1
06/04/2023 8:28 pm
A scope resolution operator is a symbol used in programming languages to access a variable or function within a particular scope. In many programming languages, the scope resolution operator is represented by the dot (.) symbol.
For example, in Java, the dot operator is used to access methods and properties of an object, as in:
myObject.myMethod();
In C++, the scope resolution operator is used to access a member of a class or namespace, as in:
MyClass::myMethod();
In PHP, the double colon (::) is used as the scope resolution operator, and it is used to access static methods and properties of a class, as in:
MyClass::myStaticMethod();
This post was modified 2 years ago by BharatUpadhyay
Add a comment
Add a comment
1
Add a comment
Forum Information
- 14 Forums
- 1,836 Topics
- 5,052 Posts
- 0 Online
- 1,078 Members
Our newest member: Richardnop
Latest Post: loli
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed