Top "Access-specifier" questions

The access specifier in an object-oriented language determines how a class restricts access to its members.

Difference between private, public, and protected inheritance

What is the difference between public, private, and protected inheritance in C++? All of the questions I've found on SO …

c++ inheritance encapsulation access-specifier c++-faq
What is the default access specifier in Java?

I just started reading a Java book and wondered; which access specifier is the default one, if none is specified?

java access-specifier
How to create a private class method?

How come this approach of creating a private class method works: class Person def self.get_name persons_name end …

ruby access-specifier
Private module methods in Ruby

I have a two part question Best-Practice I have an algorithm that performs some operation on a data structure using …

ruby private-methods access-specifier
Difference between the default access specifier and protected access specifier in java

I was trying to learn java and when I went through access specifiers I had a doubt. What is the …

java access-specifier
Private virtual method in C++

What is the advantage of making a private method virtual in C++? I have noticed this in an open source …

c++ polymorphism access-specifier
Why does Ruby have both private and protected methods?

Before I read this article, I thought access control in Ruby worked like this: public - can be accessed by …

ruby language-design access-specifier
How to set private instance variable used within a method test?

Given a class with a couple of instance variables and some methods. Some instance variables are set accessible via attr_…

ruby testing rspec access-specifier
Understanding private methods in Ruby

class Example private def example_test puts 'Hello' end end e = Example.new e.example_test This of course will …

ruby access-specifier