I'm translating a small program from C# to Java. There's 1 line left that I'm wondering about:
Thread eventReadingThread = new Thread(() => ReadEvents(url, streamingMode));
...
static void ReadEvents(String serviceURL, bool streamingMode)
{
if (streamingMode)
{
WebRequest httpClient = WebRequest.Create(serviceURL);
httpClient.Method = "GET";
byte[] buffer = new byte[4096];
...
I interpret the first line here as "True if ReadEvents returns less than empty array". However it doesn't make any sense, both because void arguments don't compile and because a boolean argument doesn't fit the constructor for Thread.
What would this be in Java?