Quantcast
Channel: HowToDoInJava
Browsing latest articles
Browse All 20 View Live

Life Cycle of JAX-RS Resource Class

Hi Lokesh, I want to know the following: When a request comes for a REST Service, how the JAX-RS runtime initiate it? Does it keep only one object of the JAX-RS resource and spawn a new thread for each...

View Article



JSON – Conditional Statement Checking

I am working on a Java program where I have to achieve conditional checking in JSON file. For instance, I have a json file with multiple entries, now through my code I pass a parameter which check this...

View Article

Canfield game in Java

I need some help in code while I am writing program for Canfield game. Any suggestion? The post Canfield game in Java appeared first on HowToDoInJava.

View Article

Java Puzzle – Find all the distinct duplicate elements

Given an input array of n positive integers where the integers are in random order. Each number in that array can occur many times. You need to find all the distinct duplicate elements and put all...

View Article

Sonar Report + Multi module maven + Jacoco

I am new to Sonar. I have multi-module maven project. please find the Project structure below -Parent | -Module A | -pom.xml (Module A) | -Module B | -pom.xml (Module B) | -Module C | | | -pom.xml...

View Article


TreeMap put operation

I have given a below map with the following below options, Map map = new TreeMap(); map.put("test key 1", "test value 1"); map.put("test key 2", "test value 2"); map.put("test key 3", "test value 3");...

View Article

How to build java,spring projects using gradle

I have tried using gradle ,but it is showing error  that “main class not available”.But I have specified the path of main class in the build.gradle file The post How to build java,spring projects using...

View Article

Java interview preparation for mid-level developers

Thanks for all the material in this blog , My question , I have 6 years of experience as java/j2ee developer and i am planning to change company. Can you please suggest what all the topics I need to...

View Article


How values gets populated into map.entrySet?

When we iterate on map.entrySet(), we get key and value. How data gets populated into entrySet, when put(k,v) is called? Please explain, I could not understand from HashMap source code. The post How...

View Article


How to secure a spring REST API url?

Hi, Please how do I authenticate a URL using spring security in Spring RESTFUL. For example, if a user try to access a route, it will return a JSON with response status and response text (“Login...

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images