Комментарии:
Marker interface are used as a indication for JVM to process certain actions. Like Serializable or Clonable. When you don't mark a class with these markers then you might get NotSerializabeException or CloneNotSupportedException kind of errors.
Ответитьthere is an interesting question about ordered and unordered array. I wonder what data type did you keep in your mind? in the case we have 1 millions entries in array with values from 1 to 10. and let's say 900 thousands of them are 1. what is the time complexity to find out an index of 1st element with value 3 or 4 in this arrays? and why?
ОтветитьHi , I Have completed all pre-screening tests , and finalised my profile, when should I expect my intro call?
ОтветитьJava heap is the main memory space available for all programs that may be running on the system and it is where we have the String pool, the soft reference, the weak reference, and hard references.
Ответитьfail-fast and fail-safe is related to all collections(those implementing the Iterable interface), mainly the way the iterator works for thread-safe vs non-thread-safe collection
non-thread-safe collections will throw ConcunrentModifException if we try to remove an element while looping for example. of course, is more than that
Static initializer is not related to static class, it is just a block of code that must be run before the constructor and is mainly used for data initialization or initialization of heavy process/object.
ОтветитьIn Java, process synchronization can be done via the built classes present in java. util.concurrent like Lock, Semaphore, CompletableFuture, and so on. I think this question was about multithreading.
ОтветитьStatic classes are generally used for utility functions via static methods
ОтветитьIt is possible to have a static class in java, for example, an inner class can be static
ОтветитьHi Jose,
Can you also cover a C# . Thanks!
Marker interfaces are iterfaces that doesn't have any methods inside them and they are just used to tag a class for JVM for some special behavior . For example Seriazable & Cloneable intrefaces are marker interfaces.
ОтветитьHi Jose,
I am Nitesh Singh from India. I am a senior Android developer with a total of 5.6 years experience . Currently looking for new job in out of country. So please help me advice me how to crack interview. Please 🙏
Marker interface is an interface with no methods declared in it
Ответить