Most voted "visibility" questions
None
Learn more…16 questions
Sort by count of
-
13
votes1
answer1859
viewsReasons to use private class
When I started in the area, in a course of POO (Object Oriented Programming) the teacher explained about access modifiers... I remember that on this very day he said that it would be possible to…
-
9
votes3
answers170
viewsHow to change property access level in an inheritance?
I have a class that when inherited I want one of its public attributes to become private, so that the user does not have access to the use of this variable in this class, but I do not know how to do…
-
8
votes4
answers635
viewsWhy can objects other than the same class access private fields from each other?
Today while I was taking a course in Udacity (Intro to Java Programming) I thought about this in the exercise Update the class Person (lesson 3 29/45). In object-oriented modeling we have the…
-
5
votes2
answers410
viewsPrivate class in Javascript
I’m looking for a way to make both attributes and methods invisible so they’re not accessible from outside the class. But I also wanted to use the modern approach to do this (class Nomeclass{}).…
-
4
votes1
answer75
viewsCompilation error on non-static element reference
public abstract class Teste { public static final Teste IMPLEMENTACAO_1 = new Teste() { @Override public void executar() { teste1(); } }; public static final Teste IMPLEMENTACAO_2 = new Teste() {…
-
3
votes2
answers988
viewsDeclare public variables in the __Construct method
Note the example of the method: <?php #noticia_construct.class.php class Noticia{ public $titulo; // Acredito que não seja necessário public $texto; // Acredito que não seja necessário function…
-
3
votes3
answers318
viewsDifference between properties syntax in C#
For what I researched, if I do: public int numero { get; set; } is the same thing as: private int numero; public int Numero { get{ return numero; } set{ numero = value; } } But in the first chunk of…
-
2
votes2
answers192
viewsDoubt visibility of attributes in class diagram
We recently had a discussion in class on the question of the visibility of attributes in the class diagram. Some have stated that in the diagram (as well as in the code) all attributes must be…
-
2
votes1
answer62
viewsWhat is the default visibility of a variable in Typescript, what is the importance of var when declaring variables?
When declaring a variable, when we omit the visibility parameter (public, private and protected) the variable is created by default in which visibility? export class AddEditTaskPage { idade: number;…
-
2
votes1
answer244
viewsPrivate class in C#
I have a class Pessoa.cs private, but I can call her in some other class, for example I created a class called Parametro.cs; I can instantiate the class private Pessoa without the slightest problem.…
-
1
votes3
answers4033
viewsUndefined reference compiling with g++
I usually use g++ to compile my code, but now that I’ve started learning template I cannot compile for anything, the following error appears: g++ -c pilha.cpp pilha-infinita.cpp g++ pilha.o…
-
1
votes1
answer850
viewsUsing another class method
I need to execute a method that is in another class. I think the two are non-activityes classes. The following class has a method called connect(). When this method is executed, at the end of it I…
-
1
votes2
answers413
viewsHow can I put a button to make it visible?
How can I click a button and make the other button visible?? Button vibrar; cor = (Button) findViewById(R.id.cores); public void clica (View View){ cor.setVisibility(View.VISIBLE); }…
-
1
votes2
answers111
viewsWhy doesn’t a private method go into the documentation in Java?
Why when a method has one void as modifier it does not appear in the documentation? As soon as I put the public it appeared in the documentation. Is there any other modifier that interferes with…
-
-1
votes1
answer89
viewsProtected methods of a DLL
I have a DLL that has several internal methods, I want to protect these internal methods so that they are called only by the DLL itself. Is there any way to define which methods may or may not be…
-
-2
votes1
answer439
viewsI need an invisible text to become visible in javascript
My problem is this: I need an invisible text to be visible when the user clicks on the image. So far so good, but I can’t make the text start invisible on the page.. This is my program (these are…