This question is also not easy to answer because volatile is not about atomicity, but there are cases where you can use a volatile variable to make the operation atomic.…
Tag: Education
Can we make array volatile in Java?
Posted in Education, and WhoCodeFirst
This is one of the tricky Java multi-threading questions you will see in the Interview. Yes, you can make an array volatile in Java but only the reference which is…
What is a compile time constant in Java? What is the risk of using it?
Posted in Education, and WhoCodeFirst
Compile time constant and Risk public static final variables are also known as a compile-time constant, the public is optional there. They are replaced with actual values at compile time…
What is a good team lead in your opinion?
Posted in Education, and WhoCodeFirst
What is the most important quality for the team lead? The strongest side of team lead (IMO) is human skills. The main task of team lead is to support morale…
Repeated Substring Pattern
Posted in Education, and WhoCodeFirst
Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume the given string…