An object is considered immutable if its state cannot change after it is constructed. Since they cannot change state, they cannot be corrupted by thread interference or observed in an inconsistent state making them useful in concurrent applications.
Switch statement in Java is for decision making. Unlike
if-then-else statements, the
switch statement can have a number of possible execution paths.
Lately, I have been thinking why shouldn't I complie set of questions that I generally include in interviews for mid-senior level Java Developers. Though I am a big fan of algorithm questions in interviews for developer, I believe including these questions either in screening or half of time in second round interview would give chance to hear about candidate's understanding on core concepts of Java 8+. I like these these questions since they include core concepts in Java that developers use in day to day jobs.
Deploying Spring Boot 2.x Applications in WebLogic Versions 12.2.x is simple then deploying those in WebLogic 12.1.x. I was struggling on the deployment of 2.x applications in 12.1.x version of WebLogic using Gradle. There is no issue if you use Maven. But, using gradle is complicated. But, finally, I got the solution and deployed successfully.
Cucumber executes test script defined in the feature file which itself is written Gherkin. Gherkin is simple English language which has different steps like Given, When, Then, Scenario etc. and this has become of the most widely used test scripting language in distributed systems like microservices to test APIs.
I'm implementing the EhCache for caching purpose in one of the projects that I've been working on.
Memoization is a technique for implementing dynamic programming to make recursive algorithms efficient. It often has the same benefits as regular dynamic programming without requiring major changes to the original more natural recursive algorithm.
There are three types of selection or decision making statements in Java. First one is
if statement which either performs (selects) an action, if a condition is true, or skips it, if the condition is false. Second is
else statement which performs an action if a condition is true and performs a different action if the condition is false. Third one is
switch statement which performs one of many different actions, depending on the value of an expression.
Objects dynamically created using new operator are deallocated automatically. The technique that accomplishes this is called garbage collection. It works like this: when no references to an object exist, that object is assumed to be no longer needed, and the memory occupied by the object can be reclaimed.