Skip to content

Tag: java

TCP threaded server/client

I’m trying to make a threaded TCP server that accept multiple client. It’s only accepting one client. Any idea on how to make the server accepting multiple client? Here is what I tried so far: I changed the server code. I ran both the server and the client, but it seems that it’s only one th…

Comparing dates with JUnit testing

Hello I’m new to the site and have a issue with my application using JUnit testing. My issue is when I try to compare the Date method with itself it always fails. I printed the Date object in the test to see the problem and always end up with the package name and random letters. Here is the Date constru…

android getlastknownlocation always null in emulator

It seems a common issue, but i really can’t understand why is it happening even though i read ton of simialr issues. I am playing with a basic location class on a emulator device, i set everything – permissions (FINE and COARSE) , i have set the coordinates in the DDMS i also tried using the telne…

Query creation in Spring Data – dynamic where clause

Is there a way in Spring data to dynamically form the where clause? What I want to do is have a method (which is like the findBy / get method) which runs a WHERE and AND using the mentioned properties which are NOT NULL. For example, Our method looks something like this Thanks. Answer Take a look at JPA Speci…