« first day (891 days earlier)    last day (2 days later) » 

5:50 PM
0
Q: Dealing with multiple font files and implementing singleton - Correct way

Krupal ShahIn my application, I require dealing with multiple font files. So, instead of creating new instance every time, I implemented Singleton to get Typeface like this: public class FontSingleton { private static FontSingleton instance; private static Typeface typeface; private FontSingl...

 
 
1 hour later…
7:19 PM
-2
Q: making a singleton class and child class of this singleton class have the fixed number of objects lets say 4

Himanshu GuptaMy interviewer asked a question to make a Singleton class with specific number of object and then create a new class extending this singleton class. there is only some specific number of objects of both parent and child singleton class and solution should work in multithreading environment.

 
8:14 PM
0
Q: How to make a class that collects static data?

ThanosLet's say that we have a Condition class. public abstract class Condition<T> { private List<T> _list = new ArrayList<>(); // add, remove, get methods } If we make another class that extends the Condition class, how can I keep the objects stored if I make a new instance of that class? ...

 

« first day (891 days earlier)    last day (2 days later) »