Skip to main content

Questions tagged [instance]

An instance is a particular occurrence of an object during the time when a computer program is running.

Filter by
Sorted by
Tagged with
-3 votes
1 answer
60 views

I'm developing a library in JavaScript (TypeScript, actually) which is split into several modules. It's meant to run both on the web and in non-web environments like Node.js. The library is meant to ...
Blue Nebula's user avatar
4 votes
2 answers
2k views

I've read somewhere about a pattern that is as follows: if it'll change the state of the instance, the method should be named with a verb and return void; and if the method just returns something (...
Bernardo Benini Fantin's user avatar
2 votes
2 answers
223 views

In concept-based programming (as in C++ concepts), I am wondering if there is a noun to say that: A type T is an XXXX of a concept C. in the same way we can say that: An object x is an instance of ...
Vincent's user avatar
  • 169
-1 votes
1 answer
432 views

I would like to know which architecture is more suitable when considering data sharing between tenants: a Multi-instance (Single-tenant) or Multi-tenant architecture with a database by tenant. ...
Alexis Mathias's user avatar
2 votes
3 answers
259 views

So an Instanced API is one that behaves like an object. So for example: foo* GetInstancedAPI(); void MemFuncSetter(foo* fooThis, const int arg); int MemFuncGetter(const foo* fooThis) const; This is ...
Jonathan Mee's user avatar
0 votes
1 answer
110 views

I was in my CS class when my instructor presented me the following classes: public class UninstantiableTest { private static Uninstantiable uninstantiable; public static void ...
Addison Crump's user avatar
0 votes
2 answers
850 views

In a Java program which I did not made and cannot change, only write extensions for it, the design forces me to create an object which will never be garbage collected. I tested and I can do it through ...
user5950's user avatar
  • 113
-2 votes
5 answers
5k views

I've been teaching myself Object Oriented Programming(Ruby) for a while. However, I still don't quite understand some of its core principles, specifically, instance variable. Could somebody please ...
Fatima's user avatar
  • 209
1 vote
1 answer
65 views

I'm creating an HTML5 game using javascript and have got some problems during the first instantiation of the objects of the scene. Scenario Self-written 2d game engine that supports multiple types ...
user avatar
-1 votes
1 answer
177 views

I have library with asynchronous thread and application who use them. Application can pass object to library of type provide by library interface. If application does not create new instance of object ...
ElConrado's user avatar
  • 121
7 votes
1 answer
10k views

I am stuck at understanding a concept related to Logger creation, especially in the context of Java EE. In my experience, I nearly always used one logger per application, with few cases when I needed ...
XMight's user avatar
  • 185
0 votes
0 answers
65 views

What will happen if I extend a class A to a controller B, when A has instance variables (private, protected)? I have a main controller MY_Controller(handler) which has several methods: can_modify (...
Kaymaz's user avatar
  • 109
2 votes
2 answers
778 views

I started learning Python yesterday and I ran into a problem. I like to hear some thoughts on it. As an exercise, I decided to build a chatserver. As part of the exercise, I wanted to write some ...
Erik Ros's user avatar
15 votes
4 answers
5k views

I use a class that just extracts data from one known object, and distributes it to other known objects. No persistent configuration or such is needed in that class instance. How should I decide ...
bebbi's user avatar
  • 361
22 votes
4 answers
239k views

I'm very new to Java and want to understand the difference between class variables and instance variables. For example: class Bicycle { static int cadence = 0; int speed = 0; int gear ...
Skylar Adams's user avatar
2 votes
2 answers
580 views

I have come across the term "garbage disposal" and now I'm worried about using up too much memory. Apparently (correct me if I'm wrong) every time an object is created, memory is reserved for it, and ...
Abbrew's user avatar
  • 31
1 vote
5 answers
1k views

Is there a case when an object is declared without a call to the constructor? as in, for example: ArrayList<Integer> grades; Or is it always the case that ArrayList<Integer> grades (as ...
Zvi's user avatar
  • 21
1 vote
2 answers
2k views

I'm learning now Java from scratch and when I started to learn about instantiating objects, I don't understand - in which cases do I need to instantiate objects? For example I'm studying from TutsPlus ...
davisdev's user avatar
3 votes
4 answers
641 views

Disclaimer: I think the rules are almost the same in most OO languages, but since I'm most familiar with C# I'll be relating to this specific language. I think that the use of attributes and ...
Louis Somers's user avatar
2 votes
2 answers
1k views

Sometimes I read in observer-pattern descriptions, to make the constructor of a observer base class protected so the class will be abstract. but by making the constructor public (if even one is ...
itwasntpete's user avatar
23 votes
4 answers
12k views

Recently I started programming in Groovy for a integration testing framework, for a Java project. I use Intellij IDEA with Groovy plug-in and I am surprised to see as a warning for all the methods ...
Random42's user avatar
  • 10.5k